Ashley Hayes wrote:
conn = Transaction.beginOptional("yourb DB name", true);
// then save with the conn object
contact.save(conn );
company.setContact(contact);
company.save(conn );
Transaction.commit(conn);
More standard would be to replace the first line above with:
conn = Transaction.begin(
Graham Leggett wrote:
conn = Transaction.beginOptional("yourb DB name", true);
// then save with the conn object
contact.save(conn );
company.setContact(contact);
company.save(conn );
Oops - ignore me - I had specified contact.save() instead of
contact.save(conn), which caused the problem, which
Ashley Hayes wrote:
think you need to get a DB connection to do the saving with...
conn = Transaction.beginOptional("yourb DB name", true);
// then save with the conn object
contact.save(conn );
company.setContact(contact);
company.save(conn );
Transaction.commit(conn);
This is exactly what I am
think you need to get a DB connection to do the saving with...
conn = Transaction.beginOptional("yourb DB name", true);
// then save with the conn object
contact.save(conn );
company.setContact(contact);
company.save(conn );
Transaction.commit(conn);
-Original Message-
From: Graham Leg