Open jkiviluo opened 9 months ago
How would the uniqueness work if more than one parameter was of entity_class type in an entity? What if you built an array or a map of entity_class?
How would the uniqueness work if more than one parameter was of entity_class type in an entity? Good question.
fish
and species
fish
class fish__species
(with entity_activity False by default)fish
Fred. Fred is to be of species
perch.fish__species
members. Cumbersome, but possible (unless it can be made with SQL itself). Maybe we can see how this works without the UNIQUE constraint first.
Parameter value can be chosen from the entities of a particular entity_class.
It could be UNIQUE (only one entity can be chosen for an entity - hard to enforce due to alternatives --> should be checked that uniqueness is not violated for any scenario) or ONE-TO-MANY.
Implementation idea: Use actual nD entity_classes to store the information (just don't show the entity_class in the tree - unless specifically chosen to do so). This way we can keep referential integrity.