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 Setting up Hibernate Discriminators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Setting up Hibernate Discriminators" Watch "Setting up Hibernate Discriminators" New topic
Author

Setting up Hibernate Discriminators

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
As I understand it, if I have constraints set up in my database, Hibernate will pretty much reverse-engineer everything I need (POJOs). Really Nice.

However, if I have polymorphic relationships (subclasses, etc.), then does the reverse engineering for POJO subclasses still work as long as I set up the database to have the "discriminator" columns?

What I'm asking is if I have a case where I need to use discriminators for polymorphic relationships, do I then need to manually edit/create the HBM mapping files or will Hibernate still reverse engineer everything for me (POJOs for subclasses, for example) as long as I set up the database to have the correct strategy (table per subclass, for example)?

Thanks in advance.

Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting up Hibernate Discriminators
 
Similar Threads
hbm2java help
Tired of hibernate eclipse plugins.... any better way ?
discriminator on two columns
Hibernate and database physical design
Learning Java and Agile Java