It's probably worth noting that you can iterate over the properties
and relationships in a generic fashion during runtime rather than
manually maintain a static list of values to copy or generating it
with a template.

On Thu, Sep 5, 2013 at 1:19 PM, Andrus Adamchik <and...@objectstyle.org> wrote:
> IMO creating a new object and initializing it afresh is the way to go.
>
> Andrus
>
> On Sep 5, 2013, at 12:33 PM, Jurgen <do...@xsinet.co.za> wrote:
>
>> If a user tries to commit an object that has been deleted in the DB (by 
>> another user) then cayenne throws an exception.
>>
>> If the desired recovery mode is that the object be inserted back into the 
>> DB, how would one instruct Cayenne to do so now ?
>>
>> I suppose setPersistanceState( NEW ) is not going to work ?
>>
>> Should I then make a newObject and copy all the fields across or is there a 
>> "simpler more elegant" way ?
>>
>> Thanks.
>> #####################################################################################
>> DISCLAIMER:
>> The information contained in this e-mail is the property of CTP Ltd and/or 
>> its associate companies and is confidential and intended for the addressee 
>> only.
>> If you are not the addressee and receive this e-mail by mistake, please 
>> notify the sender and delete this email immediately as any disclosure, 
>> copying,
>> distribution or use thereof may give rise to a claim against you.
>> The sender and/or the CTP Group accept no liability for any damages caused 
>> by this email by interception, interference, error, virus or other cause.
>> Views and opinions expressed in this email are those of the sender unless 
>> clearly stated to be those of a company in the CTP Group.
>> The Company reserves the right to lawfully monitor e-mails.
>>
>> #####################################################################################
>

Reply via email to