Well, if you want it in CayenneDataObject, you'd have to pass the
target ObjectContext to the method, but that might be a pretty good
place for it, too.

mrg


On Sat, Jul 10, 2010 at 6:40 AM, Lachlan Deck <[email protected]> wrote:
> On 10/07/2010, at 2:12 AM, Andrus Adamchik wrote:
>
>>
>> On Jul 9, 2010, at 6:41 PM, Michael Gentry wrote:
>>
>>> I was thinking we'd add a utility type method for now.
>>
>> Cool.
>>
>>> I have no
>>> expectations of modifying 3.0 for this, but was thinking it might be
>>> good in the future to have something similar.
>>
>> I am sure we will. I am stumbling over 'localObject' pretty often myself. It 
>> has to be done better.
>
> What about adding to the Persistent interface or its direct implementations: 
> CayenneDataObject / PersistentObject? i.e.,
> public <P extends Persistent> localObject(P object);
>
> Failing that, add it to the default velocity templates... or people can add 
> it to their own in the meantime.
>
> with regards,
> --
>
> Lachlan Deck
>
>

Reply via email to