Hi!
i use a simple model for manage my customer database:
public class Person {
private String _customername;
private ArrayList _phone; // Phonenumbers
...
getter
setter
etc.
}
public class Phone {
private String _number;
private PhoneType _type;
...
}
public class PhoneType {
private int id;
private String type; // e.g. Buissnes, Private, Fax, etc.
...
}
i need long transaction because i work with tomcat (and struts) to
manage the customer over web.
i generate a "p = new Phone()"
i generate an arraylist with all PhoneTypes and represent them in a
dropdownlist, so the user can choose one of the PhoneTypes.
then i take the selected PhoneType and put in the new Phone instance.
then i add the complete Phone to my Person ( person.add(p)) an try to
call a db.update(person) i get an exception:
org.exolab.castor.jdo.DuplicateIdentityException: update object which is
already in the transaction
at
org.exolab.castor.persist.TransactionContext.markUpdate(Unknown Source)
at org.exolab.castor.persist.TransactionContext.update(Unknown
Source)
at org.exolab.castor.jdo.engine.DatabaseImpl.update(Unknown
Source)
can anyone help???
isn't it really strange?
if i change the PhoneType of an existing Phone-Entry it works fine!
any sugestions? links? help????
thanx a lot
markus
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev