Incorrect relations
I have this Drizzle ORM query:
The problem is that "members" under each project.entity is empty, even though the correct rows and references are in the database. You can see how I have defined my schemas in my comment on this post.
The weird thing is, if I change the relation name to "entity" like so:
Suddenly I do get the correct result. How can this be? The relation name should be "member", because I want to fetch the nested members. Or am I misunderstanding?
Hopefully you can help me out!
The problem is that "members" under each project.entity is empty, even though the correct rows and references are in the database. You can see how I have defined my schemas in my comment on this post.
The weird thing is, if I change the relation name to "entity" like so:
Suddenly I do get the correct result. How can this be? The relation name should be "member", because I want to fetch the nested members. Or am I misunderstanding?
Hopefully you can help me out!