File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "polymorphic persistence " Watch "polymorphic persistence " New topic

polymorphic persistence

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

Could someone please explain what it means in hibernate?

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

Gavin / Christian

Could you please answer this one. No one has replied to this post.
Gavin King
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="" 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.

Java Developer, Thailand
I agree. Here's the link:
subject: polymorphic persistence
It's not a secret anymore!