mirror of https://github.com/apache/openjpa.git
Do not repeat class name in stringfied object id
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@923938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c618b4692d
commit
8dc74c1e59
|
@ -91,7 +91,13 @@ public class Exceptions {
|
||||||
if (oid != null) {
|
if (oid != null) {
|
||||||
if (oid instanceof Id)
|
if (oid instanceof Id)
|
||||||
return oid.toString();
|
return oid.toString();
|
||||||
return ob.getClass().getName() + "-" + oid.toString();
|
String oidString = oid.toString();
|
||||||
|
// some oids stringify their class names. Some do not.
|
||||||
|
if (oidString.indexOf(ob.getClass().getName()) == -1) {
|
||||||
|
return ob.getClass().getName() + "-" + oidString;
|
||||||
|
} else {
|
||||||
|
return oidString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImplHelper.isManagedType(null, ob.getClass())) {
|
if (ImplHelper.isManagedType(null, ob.getClass())) {
|
||||||
|
|
Loading…
Reference in New Issue