I have a model with several many-to-one relationships.
Essentially something like this:
<many-to-one name="property" class="Class"
column="COLUMN_ID" cascade="all" />
An example model might contain a Person, Role, and Participant relationshp where Participant is the combincation of a person, role and some relationship with some other entity.
The scenario I want to support would be for a person to participate (in the same or different roles) on different eitities. Ideally when the participation was deleted the person would be deleted if and only if it was the last relationship between that person and any participation. So the relational model is one person to many participations, but the application (or object tier) views it as a one-to-one between participation and person.
Is this possible with Hibernate - I can't seem to figure it out. Is this a problem with the model instead and not the tool?
Any thoughts appreciated.
Laine
|