I have answered my own question. The update() method does add new objects as
required.

Sorry for wasting your time.


- Derek.


-----Original Message----- 
From: Derek Ronald WEEKS [mailto:[EMAIL PROTECTED] 
Sent: Mon 9/29/2003 1:47 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: long transactions: adding with db.update()

Hi,

Class A contains a collection of class B, in a one-to-many relationship. I can
successfully load an object A, edit its fields and also the fields in the B
objects, stored in a Vector.

I need to do this in a long transaction. However, during the long transaction I
want to create new B objects and add them to object A's Vector. Is there a
simple way to commit this to the database?

The update() method doesn't appear to work if new elements have been added to
A's Vector, although it does work when elements are removed.

NOTE: I don't want to commit the new object Bs at instantiation time.


Thanks in advance,

Derek Weeks.
www.cs.mu.oz.au/SE-projects/s340gl/

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to