diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java index ada6e9a3a..316dd191e 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java @@ -1945,7 +1945,7 @@ public class ClassMetaData throw new MetaDataException(_loc.get("invalid-id", _type, fmds[i].getName())); m = Reflection.findSetter(oid, fmds[i].getName(), - fmds[i].getDeclaredType(), false); + fmds[i].getObjectIdFieldType(), false); if (m == null || m.getReturnType() != void.class) throw new MetaDataException(_loc.get("invalid-id", _type, fmds[i].getName()));