Normally a new object in your collection should be saved by updating/creating the object of your class Order (which contains the collection).
Perhaps your mapping is wrong... You should provide more information. Tatjana >>-----Urspr�ngliche Nachricht----- >>Von: Emanouil Kazaltzis [mailto:[EMAIL PROTECTED] >>Gesendet: Samstag, 14. Juni 2003 14:37 >>An: [EMAIL PROTECTED] >>Betreff: [castor-dev] adding new object to Collection isn't persisted >>automatically >> >>Hi, >> >>I'm struggling with CastorJDO. Thought it would make live easier but 'au >>contraire'. >> >>Lets assume the following: >>I have a class definition Order which has a Collection of Items. >>When I load the Order from the db using db.load( Order.class, new Long(1) >>. >>I can brows through all the items. Deleting items from the collection or >>changing attributes for an items in the collection get persist correctly >>when I commit but when I add a new Item object to the collection it just >>doesn't get created automatically. >> >>Is this because I'm doing something wrong or do I need to persist the >>newly created object manually by calling db.create( <the new item> ) ? >> >>E >> >>please reply to to:[EMAIL PROTECTED] >> >>----------------------------------------------------------- >>If you wish to unsubscribe from this mailing, send mail to >>[EMAIL PROTECTED] with a subject of: >> unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
