diff --git a/Frameworks/EOF/ERAttributeExtension/Sources/com/webobjects/eoaccess/EOAttribute.java b/Frameworks/EOF/ERAttributeExtension/Sources/com/webobjects/eoaccess/EOAttribute.java index 9bcb3560d0..01ed9b5e14 100644 --- a/Frameworks/EOF/ERAttributeExtension/Sources/com/webobjects/eoaccess/EOAttribute.java +++ b/Frameworks/EOF/ERAttributeExtension/Sources/com/webobjects/eoaccess/EOAttribute.java @@ -1663,8 +1663,9 @@ protected void _setDefinitionWithoutFlushingCaches(String definition) { } protected void _setValuesFromTargetAttribute() { - if (isFlattened()) { - EOAttribute property = (EOAttribute) _definitionArray.lastObject(); + Object definition = _definitionArray.lastObject(); + if (definition instanceof EOAttribute) { + EOAttribute property = (EOAttribute) definition; setExternalType(property.externalType()); setClassName(property.className()); setValueType(property.valueType()); @@ -1676,19 +1677,18 @@ protected void _setValuesFromTargetAttribute() { setParameterDirection(property.parameterDirection()); setUserInfo(property.userInfo()); _setInternalInfo(property._internalInfo()); + setValueFactoryClassName(property.valueFactoryClassName()); + setValueFactoryMethodName(property.valueFactoryMethodName()); + setAdaptorValueConversionClassName(property.adaptorValueConversionClassName()); + setAdaptorValueConversionMethodName(property.adaptorValueConversionMethodName()); + setFactoryMethodArgumentType(property.factoryMethodArgumentType()); int adaptorDataType = property.adaptorValueType(); if (adaptorDataType == AdaptorNumberType) { setPrecision(property.precision()); setScale(property.scale()); } - else if (adaptorDataType == AdaptorDateType) + else if (adaptorDataType == AdaptorDateType) { setServerTimeZone(property.serverTimeZone()); - else if (adaptorDataType == AdaptorBytesType) { - setValueFactoryClassName(property.valueFactoryClassName()); - setValueFactoryMethodName(property.valueFactoryMethodName()); - setAdaptorValueConversionClassName(property.adaptorValueConversionClassName()); - setAdaptorValueConversionMethodName(property.adaptorValueConversionMethodName()); - setFactoryMethodArgumentType(property.factoryMethodArgumentType()); } } }