Bruce, Thanks a ton for your assistance! Ultimately, the dirty="ignore" was not the issue exactly, but did force me to investigate and debug the SQLEngine where I caught a null String being included in the WHERE clause. It turns out that I was missing some null checking in a business object. Thanks again!
-----Original Message----- From: Bruce Snyder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 8:39 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] ObjectModifiedException in webapp, but not junit test This one time, at band camp, Marc Dugger said: MD>I'm looking for any insight into this strange problem I'm having: I am MD>receiving an ObjectModifiedException when loading and committing an object MD>with Database.update(Object o) being called to support the long transaction. MD>However, my JUnit test using the EXACT same data access code does not MD>receive this exception...everything passes just fine. The only apparent MD>difference between the scenarios is that the web app is calling the code MD>from a Struts action and the JUnit from a test case. The web app pattern is MD>as follows: I can load the entity into a web form and update the entity MD>once. But if I try to again edit the entity from the a web form I receive MD>the exception. This pattern is continually repeated: able to edit, not MD>able to edit, able to edit, not able to edit, etc. I assume that once the MD>exception is thrown the object is purged from the cache. I can post some MD>code if some thinks they might be able to help. Thanks! Marc, This exception can be thrown when a value fails the .equals() test. This can occur when using field types of float, double or date. Are you using these data types at all? If so, these fields can be isolated by telling Castor not to perform a dirty check on those fields like so: <sql name="foo" type="date" dirty="ignore" /> See if the ObjectModifiedException goes away after taking this step. Bruce -- perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
