DBMS tables do not override in general. Consider logically joined tables Party <-- Person where Person is a table which qualifies a party Party <-- Company where Company is a table which qualifies a party Person <-- DeadPerson is a table which qualifies a person. Party.name could act as a general value and it would be illogical to see Person.name and Company.name as well. You would see Company.legalName and and Person.firstName for completely different field values. It is considered very bad design to have to say: Person.birthDate = DeadPerson.dateOfBirth. So, I would restrict overriding annotations wherever it makes sense. -Lane 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 -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
- [Hibernate] hibernate annotations and overriding Emmanuel Bernard
- Re: [Hibernate] hibernate annotations and overriding Lane Sharman
- Re: [Hibernate] hibernate annotations and overri... Mark Hobson
- Re: [Hibernate] hibernate annotations and ov... Emmanuel Bernard
- Re: [Hibernate] hibernate annotations an... Joshua Davis
- Re: [Hibernate] hibernate annotations an... Lane Sharman