Java handles subclasses with identically named fields differently than some other OO languages I've used, allowing the subclass to have it's own property. From that perspective, it would be consistent to have c have it's own name property, but just because Java does it that way doesn't mean that it's the right thing to do. Like Emannuel, I don't find this behavior useful except for confusing programmers that are used to languages that do it the other way (c shares name with b).

Somehow, this reminds me of 'non virtual multiple inheritance' in C++, another language feature that always made me scratch my head and say "I hope I never have to debug a program that uses that feature!".

Emmanuel Bernard wrote:

Aside from that, I agree that annotations should be
overridable.



Hum, up to now I *really* dislike this idea. It seems to be very unintuitive to me. In SINGLE_TABLE and JOINED_TABLE strategies, it seems very weird to override annotations. Imagine b.getName() should be persisted in the b_name column and c.getName() in the c_name. How about b_name column for a c class? Will it be empty, duplicated? It seems inconsistent ; never forget that c is a b. Plus I've not found any practical use case for overridding a property in an Entity class hierarchy.





Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/



------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel







-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to