• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Table per subclass: using a discriminator  RSS feed

 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The argument here is:
"Hibernate's implementation of table per subclass does not require a discriminator column. Other object/relational mappers use a different implementation of table per subclass that requires a type discriminator column in the superclass table. The approach taken by Hibernate is much more difficult to implement, but arguably more correct from a relational point of view."

One of the things that hibernate would NOT be able to do, I suspect, is to intelligently create an instance of the appropriate subclass when the program only asks for an instance of the base class. This might be useful for some kind of look-ahead caching.

So how does hibernate handle this issue?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!