Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
When 'primary' is set on a relationship, XF\Mvc\Entity\Manager::getRelation parses the condition into a key-value set to lookup by primary key the linked entity.This has the following issues:When this key-value has 1 entry, Finder::find => Finder::whereId do not validate this is a known primary key column (they only do this for an array).For multi-column primary keys, the order is dependant on the list of conditions and not the primary key as defined in the entity. This means an unexpected cache miss may occur.An empty condition will cause the relationship to always return null, which probably isn't expected.Putting 'primary' on the wrong relationship is a painful debugging experience, since in all likely hood it just fetches the wrong object
When 'primary' is set on a relationship, XF\Mvc\Entity\Manager::getRelation parses the condition into a key-value set to lookup by primary key the linked entity.
XF\Mvc\Entity\Manager::getRelation
This has the following issues:
Finder::find
Finder::whereId
Putting 'primary' on the wrong relationship is a painful debugging experience, since in all likely hood it just fetches the wrong object
We use essential cookies to make this site work, and optional cookies to enhance your experience.
See further information and configure your preferences