From 9e044de7a7846432d1684a7873a8a434d95f23da Mon Sep 17 00:00:00 2001 From: "A. Abram White" Date: Tue, 24 Apr 2007 19:53:37 +0000 Subject: [PATCH] Fix broken functionality in allowing users to construct a custom application oid from its stringified form. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@532057 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/kernel/BrokerImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java index ecdf5090e..dfd103978 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java @@ -1100,6 +1100,14 @@ public class BrokerImpl 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);