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: Saving related objects
Date Thu, 18 Dec 2003 22:40:54 GMT
Jim Menard wrote:

> I want to make sure I understand a few basic points about using Torque.
> When I save an object, it does not save any related objects, correct? 
> For example,
>     BillAccount account = new BillAccount();
>     Address address = new Address();
>     account.setAddress(address);
>     account.save();        // This does NOT save the address, right?

Wrong - Torque WILL save the related address.

> Likewise, with deletes I have to manually delete related objects, 
> correct? (I have not yet experimented with specifying foreign key 
> onUpdate and onDelete values.)

I haven't tried these either, but in any case they will depend on the 
availability of these features in the underlying RDBMS (i.e. don't 
expect them to work for MySQL).


Scott Eade
Backstage Technologies Pty. Ltd.

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

View raw message