db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Transactions and saving - problems with commit
Date Thu, 18 Sep 2003 23:19:35 GMT
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("yourb DB name");


Or better still, instead of the above just go:

    company.setContact(contact);
    company.save();

and let Torque take care of the additional save including the transaction.

Scott
-- 

Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message