novius-os/core — pull request #140 by vrcAlbert (2014-12-04 11:19:28+00:00)
Title: make the related item retrieve by fallback equivalent to the item retrieve by the main join

As the relation is an "Has Many", it retrieves many items when making the join on "common id" and "is main OR same context".
Thus, when joining with a fallback, a condition is missing to guarantee that the item related is equivalent to the item retrieve by the main join.
This PR add this condition, which is : "context_common_id" must be the same in the two retrieved items.

Hope this is clear enough.