Hello,
the question probably sounds a bit weird, but is it possible to let the
hibernate cartridge always generate Lists and never Sets? If the cartridge
generates a Set, then I have to implement equals/hashCode. The problem is
that I have classes that may be equal concerning their attributes, but
actually they are not equal. In order to decide whether they are really
different I would have to check lots of other associations to other classes.
Therefore a simple equals/hashCode implementation is not possible. Due to
this reason I wondered whether it would be able to always generate Lists. 

My first thought was: Ok I look for the part of the xpt which creates the
Set and there I change the code in that way that it always create Lists.
Besides the fact that I'm not sure whether this really works its a bit ugly
as I would have to change the files every time I'm upgrading to a new
version of the cartridge. My next thought was: I do not change the
extensions but instead I introduce a transformation, which assigns the
ordered-Restriction to every affected association. As a consequence of this
I do not have to specify "ordered" for every (affected) association. 

Are there any other possiblities to solve this problem? Can you give me some
hints on how to implement the mentioned transformation (if there is no
easier solution).
I know that I could use the "ordered" for every assocation, but I'm
searching for an alternative.

Thank you in advance.

Best regards,
Tom
-- 
View this message in context: 
http://www.nabble.com/Hibernate---Always-generate-List--tp22929008s17564p22929008.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to