Skip to content

Subrelations broken after many to many #623

@BurkhalterY

Description

@BurkhalterY

Environment

(I don't use Nuxt)

Reproduction

https://codesandbox.io/s/wizardly-wood-cq6t5f?file=/src/App.vue

Describe the bug

When I use a many to many relation, I can't use a subquery to get a relation on the related model.

E.g.

If I want to get all users of all roles, and then get all posts of these users, the posts object key of the returned object is empty :

roleRepo.with("users", (query) => query.with("posts")).get()

But if I try to get posts directly from user, it works :

userRepo.with("posts").get()

Thank you for your help and sorry for my bad English !

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions