[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Discriminator Column in Joined Inheritance Strategy?

rabbiaqaswar do-not-reply at jboss.com
Tue Apr 3 08:57:48 EDT 2007


Hi

Can anyone please tell me how to use the Discriminator Column in queries when using the Joined strategy for Inheritance?

I have three database tables, Employee, PartTimeEmployee and FullTimeEmployee. 
For these tables i have three entities, abtract parent class Employee having two subclass entities i.e. PartTimeEmployee & FullTimeEmployee. The name of discriminator column in Employee is ETYPE.

Now if i want to run a query in which i want to get all the PartTimeEmployee from the Employee table, how can i use the ETYPE column to differentiate between the two types of Employees so that i only get all the PartTimeEmployees?

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034056#4034056

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034056



More information about the jboss-user mailing list