• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inheritence in EJB 3.0  RSS feed

 
Amar Deep Singh Chaudhary
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers

is any body can tell me that, the discriminator column is required in Joined Inheritence statergy or not. if yes then please give some code sample and also tell that is need to generate getters and setters in base class for discrimanator column.

thanks
with regards
Amar Deep Singh
amardeep.100webspace.net
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

the discriminator is only needed if you use a single table per class hierarchy. Because entity objects of all classes of the particular inheritance hierarchy are stored to the same table you need this discriminator value so that you can clearly distinguish to which class an entity belongs.

Marco
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!