Hello folks,

as we are productively working with Castor, I've detected another bug.
It quite heavy to find (like the old keygenerator bug, you remember?),
but here it is:
Imagine having a object and:
- creating it.
- you change only persistent capable fields (n-1 relations)
- commit.

After that, the RDBMS is not updated to the latest value, as the
updatePersist flag is not set correctly after changing such a field.
I appended it inline into this mail. If there are no claims about it,
I think Thorsten will commit it.

Maybe one can shade a little bit of light on me on that damn isCheckDirty()
thingy. I saw it used several times in there, but as it makes up this
error, it may have potential for another few...


------ snip ----------
Index: ClassMolder.java
===================================================================
RCS file: /cvs/castor/castor/src/main/org/exolab/castor/persist/ClassMolder.java,v
retrieving revision 1.74
diff -u -r1.74 ClassMolder.java
--- ClassMolder.java    6 Dec 2001 06:40:41 -0000       1.74
+++ ClassMolder.java    29 Apr 2002 13:30:41 -0000
@@ -1240,7 +1240,7 @@
                         if ( value != tx.fetch( fieldEngine, fieldClassMolder, 
fields[i], null ) )
                             throw new DuplicateIdentityException("");
                 } else {
-                    if ( _fhs[i].isStored() && _fhs[i].isCheckDirty() )
+                    if ( _fhs[i].isStored() /*&& _fhs[i].isCheckDirty()*/ )
                         updatePersist = true;
                     updateCache = true;
------ snip ----------



sincerely,

Patric Bechtel
IPCON Informationssysteme

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to