I have created a simple test with a Person->Car one-to-one
relationship. When the relationship is "related", therefore both
objects get created, everything works fine. However when I change to
"depends" and create only the Person object, create fails saying:
org.exolab.castor.jdo.ObjectModifiedException: Transaction aborted:
Object of type Person with identity 1 has been modified by a concurrent
transaction.
Thank you for any help!
Norbert
Person:
public int id;
public String name = null;
public Car car = null;
Car:
public int id;
public String description = null;
<mapping>
<class name="Person" identity="id">
<map-to table="person" xml="Person" />
<field name="id" type="integer" direct="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="name" type="string" direct="true">
<sql name="name" type="char" />
<bind-xml node="element"/>
</field>
<field name="car" type="Car" direct="true" >
<sql name="car_ref" />
<bind-xml node="element"/>
</field>
</class>
<class name="Car" identity="id">
<map-to table="car" xml="Car" />
<field name="id" type="integer" direct="true">
<sql name="id" type="integer"/>
<bind-xml node="element"/>
</field>
<field name="description" type="string" direct="true">
<sql name="description" type="char" />
<bind-xml node="element"/>
</field>
</class>
</mapping>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev