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
This commit is contained in:
A. Abram White 2007-04-24 19:53:37 +00:00
parent 44c97873fb
commit 9e044de7a7
1 changed files with 8 additions and 0 deletions

View File

@ -1100,6 +1100,14 @@ public class BrokerImpl
return new ObjectId(cls, val); return new ObjectId(cls, val);
return 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 Object[] arr = (val instanceof Object[]) ? (Object[]) val
: new Object[]{ val }; : new Object[]{ val };
return ApplicationIds.fromPKValues(arr, meta); return ApplicationIds.fromPKValues(arr, meta);