openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: svn commit: r751910 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-persistence-jdbc/src/test/java/org/apac...
Date Wed, 11 Mar 2009 17:46:03 GMT

Hi Craig,
  We are in difficult position if JPA Spec *does not* change the method
signature to return the detached instance (be it a copy or the original). I
had mailed to Kevin (and now you:) to place such a request with JPA Spec
committee so that OpenJPA can remain backward compatible.

  We have not yet changed the API signature of detach() for OpenJPA as JPA
2.0 detach() is not yet on the published draft version but soon will be
(within this week, I suppose). Because detach() still returns an instance, I
had overlooked the question you raised. 

A test case for new behavior is in 

Old behavior with the new configuration is indirectly tested by the whole
test corpus. But few tests in the corpus that failed with the new behavior
and I had to change their configuration to emulate old behavior are

No code change but only configuration change to
      "openjpa.Compatibility", "FlushBeforeDetach=true,CopyOnDetach=true"

Regards --



Craig L Russell wrote:
> Hi Pinaki,
> Since the JPA signature has no return value, how can the user get the  
> detached objects?
> Do you have a test case for the old behavior with the new configuration?
> Regards,
> Craig
> On Mar 10, 2009, at 3:05 PM, Pinaki Poddar wrote:
>> Hi Craig,
>>  I understand your concerns because I had similar ones. That is why  
>> this
>> change does retain the past behavior exactly as it was. The user only
>> requires the following configuration to get exactly the same behavior
>>  openjpa.Compatibility=FlushBeforeDetach=true,CopyOnDetach=true
>>  In fact, JDO having a separate signature as detachCopy() is a good  
>> news
>> because then we can add the same signature to Broker so that the  
>> user will
>> not even need the above configuration for backward compatible  
>> behavior.
>>  Regards --
>> -- 
>> View this message in context:
>> Sent from the OpenJPA Developers mailing list archive at
> Craig L Russell
> Architect, Sun Java Enterprise System
> 408 276-5638
> P.S. A good JDO? O, Gasp!

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message