Author: ssegu
Date: Fri Aug 29 11:10:22 2008
New Revision: 690355

URL: http://svn.apache.org/viewvc?rev=690355&view=rev
Log:
OPENJPA-446.

Added:
    
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java
      - copied, changed from r596731, 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java
    
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java
      - copied, changed from r596731, 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java
Modified:
    
openjpa/branches/0.9.7-r547073/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java

Modified: 
openjpa/branches/0.9.7-r547073/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java
URL: 
http://svn.apache.org/viewvc/openjpa/branches/0.9.7-r547073/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java?rev=690355&r1=690354&r2=690355&view=diff
==============================================================================
--- 
openjpa/branches/0.9.7-r547073/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java
 (original)
+++ 
openjpa/branches/0.9.7-r547073/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java
 Fri Aug 29 11:10:22 2008
@@ -548,7 +548,8 @@
     public void settingStringField(PersistenceCapable pc, int idx, String cur,
         String next, int set) {
         accessingField(idx);
-        if (cur == next || !_loaded.get(idx))
+        if (cur == next || (cur != null && cur.equals(next))
+                || !_loaded.get(idx))
             return;
         lock();
         try {

Copied: 
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java
 (from r596731, 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java)
URL: 
http://svn.apache.org/viewvc/openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java?p2=openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java&r1=596731&r2=690355&rev=690355&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java
 (original)
+++ 
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/Record.java
 Fri Aug 29 11:10:22 2008
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.openjpa.persistence.detachment;
 
 import javax.persistence.Entity;

Copied: 
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java
 (from r596731, 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java)
URL: 
http://svn.apache.org/viewvc/openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java?p2=openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java&r1=596731&r2=690355&rev=690355&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java
 (original)
+++ 
openjpa/branches/0.9.7-r547073/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachment.java
 Fri Aug 29 11:10:22 2008
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.openjpa.persistence.detachment;
 
 import javax.persistence.EntityManager;


Reply via email to