Hi, All,
For what its worth, I think it's a lot easier to just make a duplicate version of the DataObject that isn't inherited from CayenneDataObject. Then you can just use BeanUtils to load the properties in the Cayenne DataObject. This is a little repetitive, but you can make a script to generate your initial set automatically and then modify them to suit your needs. We do this because it makes form validation, etc a little more convenient and is more conducive to distributing the application down the road, where the web app and the business logic might not necessarily be on the same server. Try using a DataObject then :)-----Original Message----- From: Fredrik Liden [mailto:fliden@translate.com] Sent: Wednesday, February 16, 2005 1:27 PM To: cayenne-user@objectstyle.org Subject: RE: The life of a DataObject Thanks for your feedback Mike, that makes sense! How about using another DataObject that hasn't been registered with the context to collect the data and then copy that data over to a live DataObject. All in one fetch, update, commit cycle like you suggested. For new objects I guess I don't need a separate object. When it's filled out I'll only need to register it with the context and submit it.
This archive was generated by hypermail 2.0.0 : Wed Feb 16 2005 - 14:26:13 EST