I would like to ensure that an entity is contained in at most one single entity.
Is it possible to check this from the mapping files? In SQL land, I want to ensure
that if a table has a foreign key, that there are no repeated entries in the foreign key column.
Thanks!
Jorge
Just make the FK unique:
Or, from the collection side:
(I omitted all attributes non related to the problem)