can you try this (pseudocode):




Person person = Person.Factory.newInstance();

person = personDao.create(person);



Car car = Car.Factory.newInstance();

car = carDao.create(car);



person.getCars().add(car);

personDao.update(person);





the problem you are seeing is that the car is never persisted into the DB, 
meaning: it has no identifier so cannot be persisted in the collection of the 
person association



for that reason you'll need to create the car first in the DB, and make it 
receive an identifier, then the car can be used in .add(car)



please note that this only happens because you're creating the car instance 
right here, you're not calling CarDao.load to get the car instance
--
Wouter Zoons - [EMAIL PROTECTED]

http://www.andromda.org/
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3865#3865
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to