This content has been marked as final.
Show 3 replies
-
1. Re: Entity inheritance question
liudan2005 May 4, 2006 9:05 AM (in response to liudan2005)anyone knows?
-
2. Re: Entity inheritance question
dbudworth May 4, 2006 1:14 PM (in response to liudan2005)I'd be interested to know if there's a fancy way as well, but what we have to do is:
em.createQuery("from Pets p where p.type = 'dog'")
or whatever is equivilent (selecing on the descriminator specifically in your case I'd expect) -
3. Re: Entity inheritance question
liudan2005 May 5, 2006 10:27 AM (in response to liudan2005)thanks for your suggestion.
my person object is passed around in a transaction and it doesn't know whether it needs cats or dogs by the time it's selected. there's no way i can do this unless i retrive person from the database again. it would be nice to know how others handle this situation.