I'm using JBoss 4.0.4CR2

I have an Entity A and an Entity B.
B1 and B2 extend B with SINGLE_TABLE InheritanceType (with a discriminator 
column).
A has some B1 and some B2 : I have two relations OneToMany between A and B1, 
and A and B2. 
These relations are mapped by the same field on B with a reference on A : 
one relation ManyToOne B-A mapping 2 relations OneToMany A-B1 and A-B2.
I prefere having the same field on B, because all classes extending B have this 
relation, I won't create a new mapping field for each Bx.

When I try to get all B1 from entity A, jboss try to get all B's from database, 
and then throws an Exception because it sees that a record are not B1, but B2.

I think that when I call the getter method (getB1), it make only check on 
mapping field, but not on Inheritance DiscriminatorColumn "type".

How can I make it works ?

Thanks.


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

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


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to