Actually "localObject" is too loaded, performing a set of vaguely related distinct tasks... It has to be split into multiple methods (and IIRC we discussed it briefly some time ago). This particular variety is closer to "merge", vs. "localObject(id, null)" which is something like "locate"... Since this is rather visible public API and there are some caveats, we need to give it some more thought I think, identifying all the scenarios before creating appropriate methods.

Andrus


On Jul 9, 2010, at 5:36 PM, Michael Gentry wrote:

Would it make sense to add:

public Persistent localObject(Persistent source)
{
  return localObject(source.getObjectId(), source)
}

to DataContext and friends?  We are starting to use that a bit here
and it seems like it would be much simpler to me.

Thanks,

mrg


Reply via email to