[jboss-user] [EJB 3.0] - Re: Inconsistent behavior of Discriminator
hitman_in_wis
do-not-reply at jboss.com
Mon Aug 14 11:31:55 EDT 2006
Ok, I did figure the wierd part out as to why I was getting multiples of the same object instead of the 10 different database rows. My Id was declared incorrectly, and was identical among the ten rows. Apparently the Java Persistence sees that the objects all have the same Id and, since there is already one in memory, decides to point at that one instead of loading the row from the database. So that makes sense.
What still doesn't make sense, however, is that a discriminator is not used during join queries. I am still getting all 10 rows from the database, regardless of whether they fit the discriminator. Can anyone explain that one?
Thanks!
-Brett Birschbach
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965021#3965021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965021
More information about the jboss-user
mailing list