From 548ccbcf959025988fc9ee517ba1a0ef983ee449 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Tue, 16 Dec 2008 01:59:34 +0000 Subject: [PATCH] OPENJPA-828: Switch field value access based on declaredTypeCode rather than typeCode to take care of externalized fields. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@726927 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/enhance/ReflectingPersistenceCapable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ReflectingPersistenceCapable.java b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ReflectingPersistenceCapable.java index 869c5e81f..aed35ec95 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ReflectingPersistenceCapable.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ReflectingPersistenceCapable.java @@ -89,7 +89,7 @@ public class ReflectingPersistenceCapable public void pcProvideField(int i) { Object value = getValue(i, o); - switch (meta.getField(i).getTypeCode()) { + switch (meta.getField(i).getDeclaredTypeCode()) { case JavaTypes.BOOLEAN: sm.providedBooleanField(this, i, value == null ? false : ((Boolean) value).booleanValue()); @@ -137,7 +137,7 @@ public class ReflectingPersistenceCapable } public void pcReplaceField(int i) { - switch(meta.getField(i).getTypeCode()) { + switch(meta.getField(i).getDeclaredTypeCode()) { case JavaTypes.BOOLEAN: setValue(i, o, Boolean.valueOf( sm.replaceBooleanField(this, i)));