I have a mapping like this

    <field name="MyObject" type="jdotest.MyObject">
      <sql name="Object_id"/>
    </field>


    db.begin();
    MyObject OBJ = (MyObject)db.load(MyObject.class,new Integer(1));
    db.commit();
    db.begin();  <-- Long Transaction Begin
    obj.setMyObject(OBJ);
    obj.setName("Object 3");
    db.create(obj);
    db.commit();

    // This will set a NULL value to the the Object_id field


    db.begin();
    MyObject OBJ = (MyObject)db.load(MyObject.class,new Integer(1));
    obj.setMyObject(OBJ);
    obj.setName("Object 3");
    db.create(obj);
    db.commit();

   // This will set the value correctly

Why the value will set to NULL within a Long Transaction. Another know how 
to set the value correctly with a Long Transaction.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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

Reply via email to