I wanted to post a second time because I've spent some time debugging and realized my first posting was wrong. I have a server that has been working in past jboss releases fine. Same code base, but with 3.2.4 I'm having problems. I have a bean with a 1-to-many relationship with another bean. Now if once all the beans are in the cache, everything works great. I found out that if I read one bean time by primary, I can cache the server. But in an uncached server reading multiple keys at once, I get the following exception thrown from JDBCCMP2xFieldBridge.java
throw new IllegalStateException(
"New value [" + value + "] of a foreign key field "
+ " changed the value of a primary key field "
+ "[" + fieldState.value + "]");
Tracing through this code, I see the server calling the setInstanceValue() method trying to update the many side bean with the foreign key for the first time. Basically the bean has a null value for this foreign key field and the caller is trying to set it to the correct value. But since the isPrimaryKeyMember() is set to true and the values are different (so the isValueChanged() returns true), it throws the exception. I'm using xdoclet to generate relationships. Here it is
* @return a collection of identifications
* @jboss.relation-read-ahead strategy="on-load"
Is there some mistake here that is causing this behavior in the new release that older releases didn't care about?
Thanks in advance,