alanmehio wrote:
Hi,
Just some thought which may help.
What is the purpose of the attribute in the interestion table ( parent-children). As I guess, there is not attribute defined in the interesction table. Can you justify why?
Have you taken a look at the Person Event tutorial source code. The tutorila is part of the hibernate download zipped file.
Why you want to use list instead of the set in your many-to-many association.
Thanks
Thanks to all for replies.
I've understood that attribute on relationships are not permitted... and i think that only (but not best) way for my problem is an entity.
I give you some answer to your question.
The reason of an attribute in an many-to-many relation is that i need a particular field for any association parent-child: this field has "flag" meaning for particular logic behaviour: if an event occur i will have a value for couple parent-child, otherwise i will have other values.
I'm working on an existing db and on an existing application, so i can't "re-think" all my domain strate.
For the set you're right: a list is unnecessary and a set is more correct.
i'm going to create an entity that will wrap a children entity and attribute.
If you have any better idea... i'm listening to you
:D
Bye
nickponico