Apache JDO Project - Re: Remove pm.attachCopy? (was: RE: RETRY: Transient instance referencing

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > October 2005 > Re: Remove pm.attachCopy? (was: RE: RETRY: Transient instance referencing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Remove pm.attachCopy? (was: RE: RETRY: Transient instance referencing
Wes Biggs

2005-10-20, 5:45 pm

I think this is an excellent idea.

I'd be happy to remove the copy semantic on transient instances in order
to eliminate the need for a separate method. My feeling is that
transient instances are likely to be retained as references, and it's
actually less confusing if those references become persistent-new.

Wes

Matthew T. Adams wrote:

>I like the convergence in the api, and I also like the suggestion to return
>the root object(s) from makePersistent, as it increases symmetry.
>
>Could attachCopy and makePersistent become one, just makePersistent? The
>only difference in the proposal as you suggest, Craig, is the handling of
>transient instances. attachCopy copies instances and makes the copies
>persistent-new, whereas makePersistent just makes them persistent-new; all
>other behavior is the same. If we got rid of attachCopy, in favor of
>makePersistent, and changed makePersistent such that it returns the root
>object(s) given, then the behavior is covered, except for attachCopy's copy
>semantic for transient instances. The only difference in the API if we keep
>attachCopy is the copy semantic for transient instances, which I don't think
>is all that important.
>
>Thoughts?
>
>--matthew
>
>
>
>
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com