Hello Christofer,

I guess, you are using CMR setter to establish relationship. In case
of FK fields are mapped to primary key columns you can't use CMR
setters, as it involves changing primary key value that is not
allowed.
Perhaps, I might not throw this exception if new value does not change
primary key value. Does it look reasonable?

Are you porting some app from other server? How is it working on that
server?

Thanks,
alex

Monday, March 24, 2003, 11:28:55 AM, Christofer Dutz wrote:

CD> Hi,

CD> I am having some big problems with CMR. In JBoss 3.2 CVS

CD> OrderEnt: has the PrimaryKey field id
CD> OrderLineEnt: hat the PrimaryKey Class OrderLinePrimaryKey which uses the Fields
CD> id and orderId

CD> I now want to create a CMR in which one OrderEnt can have many OrderLineEnts.

CD> When creating a new bean I get exceptions from JBoss. When looking in the log
CD> file I can see JBoss is complaining:

CD> "java.lang.IllegalStateException: Can't modify relationship: CMR field
CD> OrderLineEnt.OrderEnt_ordLines has _All_ foreign key fields mapped to the
CD> primary key columns. Primary key may only be set once in  ejbCreate  [EJB 2.0
CD> Spec. 10.3.5]."

CD> What am I doing wrong ?




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to