Phil Richardson
08/07/2021, 8:04 PM(optional)BackReferencedOn
for use in my entity, but there is scant examples out there.
I note issue 583 covering an example of this, but it doesn't seem anything got back into the Wiki
It states
... you expect zero or one additional info for a user, but every info has userIt should be expected to be a 1-to-1 mapping only The wider crux of this means the following expanded knowledge For 1-to-1 mapping Use
(optional)BackReferencedOn
on the entity that will always exist
Use referencedOn
on the entity that may or may not exist, but will never exist unless the parent does
Accessing either value in a entity will only ever return a single entity (or null depending on use)
For 1-to-many mapping
Use referrersOn
the left hand side entity - The 1 entity, that can have many children refer to it - Its value in a entity will be a list (0 or more entries)
Use referencedOn
the right hand side entity - The many entities, that can refer to a single parent entity - Its value will be a entity (always 1)
Is this (weird, if convoluted) interpretation correct?