What i want to get is to this...
Code:
Task <> (Composite) 1 --------- n TaskAttribute 1 --------- 1 Attribute
where Task has a map of TaskAttribute instances and every TaskAttribute instance has a reference to one only Attribute.
The attribute is an entity, so if I delete the TaskAttribute the Attribute is not deleted, otherwise TaskAtribute instances are Task composite, so If I delete a certain Task all TaskAttributes childs of that Task are inmediatly deleted.
I've been trying to create these schema through the *.hbm.xml but there're several things i couln't resolve, e.g. the composite-element tag.
Could any one please write down the file.hbm.xml containing the three classes examples ? Already read the doc but couldn't find any example as this, and tried as already said various ways of implementing the diagram described but had no luck.
Thanks all.