Re: Merge strategies and OPENJPA-245

2008-04-07 Thread Michael Dick
Hi Abe, I like this approach better - since we already have at least one customer hitting the corner case. The caveats seem reasonable to me, but then again I'm not working on Kodo ;-). Does anyone else object, or have other concerns? -Mike On Fri, Apr 4, 2008 at 3:41 PM, Abe White <[EMAIL PROT

Re: Merge strategies and OPENJPA-245

2008-04-04 Thread Abe White
Here's another option that might suit everyone: - We change the enhancement so that a non-default auto-assigned pk field makes an instance detached even in the absence of detached state, as I proposed. - If the entity doesn't use auto-assigned pk fields (and has no version field) and detached stat

Re: Merge strategies and OPENJPA-245

2008-04-04 Thread Michael Dick
Hi Abe, I'm guilty of not updating 245 after I finished it. The scenario that got me to look into it is the edge case you mentioned - the entity has no auto generated fields. Improving the story for other scenarios sounds good to me and I like the approach. My main concern is that we don't break

Merge strategies and OPENJPA-245

2008-04-04 Thread Abe White
OpenJPA typically uses an enhancer-added "detached state field" to differentiate newly-constructed instances that need to be inserted vs. detached instances that need to be updated on merge. This is covered in more detail in the user manual. OpenJPA also allows users with version fields to manual