Replies: 2 comments 2 replies
-
If you know the cake instance, it means you know its ID, so then you just need to query the fillings and filter based on the cake FK. Does this make sense? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Closing because the problem is actually different to how I have explained it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
EDIT: I actually don't have a many to many relationship like the cake to filling as described... it's more of a linking situation. I'll open another question because this one isn't right.
~I'm
looking to fetch a bunch of items based off a many-to-many relationship. If we take the example from here: https://www.sea-ql.org/SeaORM/docs/relation/many-to-many/How would we then create a function that got all the Fillings without getting the Cake first (e.g. not usingwith_related
after loading the cake from the database) when we just have the cake id?I think I can do something like:But that kinda feels icky to create the dummy_cake , especially if there's a bunch of fields that I just don't need for the query.I'm just making up air code, but is there something like this available?Thanks!Ps. I also posted this in the discord... just wasn't sure the best place was to get support :-)Beta Was this translation helpful? Give feedback.
All reactions