openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r532057 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Date Tue, 24 Apr 2007 19:53:38 GMT
Author: awhite
Date: Tue Apr 24 12:53:37 2007
New Revision: 532057

URL: http://svn.apache.org/viewvc?view=rev&rev=532057
Log:
Fix broken functionality in allowing users to construct a custom application
oid from its stringified form.


Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?view=diff&rev=532057&r1=532056&r2=532057
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Tue Apr 24 12:53:37 2007
@@ -1100,6 +1100,14 @@
                         return new ObjectId(cls, val);
                     return val;
                 }
+
+                // stringified app id?
+                if (val instanceof String 
+                    && !_conf.getCompatibilityInstance().
+                        getStrictIdentityValues()
+                    && !Modifier.isAbstract(cls.getModifiers()))
+                    return PCRegistry.newObjectId(cls, (String) val);
+
                 Object[] arr = (val instanceof Object[]) ? (Object[]) val
                     : new Object[]{ val };
                 return ApplicationIds.fromPKValues(arr, meta);



Mime
View raw message