Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raw row fetching issue with composite keypaths and custom classes #1015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
}
}
}
Expand Down
Loading