Replies: 1 comment 10 replies
-
Can you compile this into a complete script I can run myself? As in https://github.com/mikro-orm/mikro-orm/tree/master/tests/issues
The query that fails is the populate query - no populate hint -> no populate queries. If you do Generally speaking, I would discourage this - it only adds complexity to the entities, your UUID is unique on its own, so you don't need a composite PK here. On the other hand, its a matter of preference, and it should work, especially if it works with the QB + edit: now I see you do |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have tried searching though I wasn't sure how to word it exactly, I apologize if this was already discussed. I believe my issues is similar to this one.
I have two entities, e.g. Questions and Answers.
in the db,
Answer.question
actually maps toanswers.question_id
andanswers.question_created_at
since questions has a multi-pkey that answers need to storefinding many fails when I do a find with the populate,
because the where clause looks for
questions.question_id
andquestions.question_created_at
instead of eitherquestions.id
andquestions.created_at
oranswers.question_id
andanswers.question_created_at
but it works without the populate (question just isn't populated)
and it works if I use queryBuilder instead
I was wondering if I was doing something wrong or if I'm supposed to just use queryBuilder?
is one better than the other? queryBuilder vs find?
Beta Was this translation helpful? Give feedback.
All reactions