There was a bug in foreign key handling. When the relationship was modified on one side while the other side was not yet loaded, then when this other side was loaded from the database (already outdated) foreign keys where not properly handled. Perhaps, this could affect your application.
Unfortunately, I can't say what other side effects could occur in 3.2.2 with your application not having the code and traces. The bug I fixed showed itself in some specific cascade-delete case.
If there are problems, please, let me know.


Gavin Matthews wrote:

All,
I'm attempting to upgrade an app from JBoss 3.2.2RC3 to 3.2.3RC1. However I got a failure in a testcase that makes me wonder why this ever worked.


I'm using SqlServer 2000 and the problem occurs with foreign key fields of type UniqueIdentifer which map to primary keys. I'm handling the guids as Strings and not byte[] as they're easier to work with and it allows me to do more with finders etc.

The unique identifier I'm generating when creating the ejbs are upper case. However when the database is queried the unique identifier comes back as lower case (I'm assuming this is just the standard behaviour of the Sprinta JDBC driver). This causes a failure in JDBCCMRFieldBridge::load() - the issue is in JDBCCMP2xFieldBridge::setInstanceValue(), the test fieldState.isValueChanged(value) returns true (one string is upper case and one is lower), and because my foreign key maps to a primary key I get the exception:

            throw new IllegalStateException(
               "New value [" + value + "] of a foreign key field "
               + getFieldName()
               + " changed the value of a primary key field "
               + cmpFieldIAmMappedTo.getFieldName()
               + "[" + fieldState.value + "]");

The solution appears simple enough - generate guids in the same case that the database driver returns them in (i.e. lower).

However my question is, why did this ever worked in 3.2.2? I'm guessing that 3.2.2 didn't reload the foreign keys from the database (so it didn't notice the case issue) and 3.2.3 does - however I'd appreciate if someone could fill in the blanks, what were the changes in 3.2.3 that exposed this failure? What side-effects could I see when running my app with this problem against 3.2.2?

thanks,
gavin





------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to