From 09a96b59de9e9cc6d2dc98e4ca21687e2e25a773 Mon Sep 17 00:00:00 2001 From: Henrique Prange Date: Fri, 20 Oct 2023 23:18:11 -0300 Subject: [PATCH] Fix raw row fetching issue with composite keypaths and custom classes --- .../com/webobjects/eoaccess/EOAttribute.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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()); } } }