Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
Issue was mentioned here :
http://article.gmane.org/gmane.comp.web.click.user/114
To recap : each call to getDataObject would create and register a new data object instance, if that object is not persisted in the database.
For already persisted object there is no problem.
What I would like todo is the following :
Department dep = (Department) cayenneForm.getDataObject(); //<--this call creates and registes new data object
dep.setPerson(person);
//because saveChanges() also makes a call to getDataObject(), another department is created and registered with cayenne,
//and we end up with two database entries.
cayenneForm.saveChanges();
Kind Regards,
bob