File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes polymorphic persistence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "polymorphic persistence " Watch "polymorphic persistence " New topic
Author

polymorphic persistence

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Could someone please explain what it means in hibernate?
Thanks


Groovy
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Gavin / Christian

Could you please answer this one. No one has replied to this post.
Gavin King
author
Ranch Hand

Joined: Aug 31, 2004
Posts: 76
It means that:
(1) I can map an inheritance hierarchy to a suitable relational model (using a choice of various data modelling strategies)
(2) I can have an association, or a query, which refers to a superclass, and Hibernate will instantiate and populate an instance of the correct subclass at runtime


Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/193239415X/ref=jranch-20" target="_blank" rel="nofollow">Hibernate in Action</a>
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Polymorphic persistence preserves pointer relationships (or morphology) among persisted objects, and also allows the restoring process to restore an object without prior knowledge of that object's type.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: polymorphic persistence