You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to preload the OneToMany collection on the other side of this relation (i.e. loading multiple Parents and using populate: ["children"], none of the Parent.children collections are populated correctly b/c this line is failing to match:
const items = children.filter(child => child[(prop.mappedBy)] as object === entity);
I have a parent/child relationship but populate is not working because the child's
mappedBy
/ManyToOne
is modeled with anIdentifiedReference
.I.e. in the
child
, I have:When I try to preload the
OneToMany
collection on the other side of this relation (i.e. loading multipleParent
s and usingpopulate: ["children"]
, none of theParent.children
collections are populated correctly b/c this line is failing to match:https://github.com/mikro-orm/mikro-orm/blob/master/lib/entity/EntityLoader.ts#L76
Because the
child["parent"]
is trying to match onentity
, andentity
is aParent
instance, but thechild["parent"]
field is an IdentifiedReference.The text was updated successfully, but these errors were encountered: