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
Pretty sure I’m missing something, would like to understand what.
Getting (checking for existence of) a relationship using the related object’s id returns the wrong parent object, doesn’t load the relationship either.
After thinking about it, I guess I misunderstood the documentation and am trying to square a circle.
The example led me to think a relationship could be used as a predicate for the returned data, but it appears that it only controls which relationships get loaded or not — all objects will be returned in any case.
Describe the bug
Pretty sure I’m missing something, would like to understand what.
Getting (checking for existence of) a relationship using the related object’s id returns the wrong parent object, doesn’t load the relationship either.
Steps to reproduce the bug
board_item
highlight_board_item
Using the ID of a
board_item
that is not highlighted (i.e. assigned to the 1:1 relationship), but in the database nonetheless.this.board_item.id: $uid14
Ultimately I want the
.get()
above to be turned into.exists()
, which would returnTrue
in the above.The above object corresponds to the one that is linked to the highlighted item, and does not have its predicate relationship loaded anyway.
The following should be working a priori, but doesn’t:
Horrible workaround:
Expected behaviour
I expected the returned array to be empty, as there are no object that satisfy the relationship predicate.
Versions
The text was updated successfully, but these errors were encountered: