HHH-18028 TCK test failure with attribute converter and Embeddable

This commit is contained in:
Andrea Boriero 2024-04-29 17:09:12 +02:00 committed by Steve Ebersole
parent 2878b44303
commit 01028f4943
2 changed files with 6 additions and 5 deletions

View File

@ -126,7 +126,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
return;
}
final String propertyName = property.getName();
final String propertyName = property.resolveAttributeName();
if ( attributeConversionInfoMap.containsKey( propertyName ) ) {
return;
}
@ -144,7 +144,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
@Override
protected AttributeConversionInfo locateAttributeConversionInfo(MemberDetails attributeMember) {
return locateAttributeConversionInfo( attributeMember.getName() );
return locateAttributeConversionInfo( attributeMember.resolveAttributeName() );
}
@Override

View File

@ -199,21 +199,22 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
// technically we should only do this for properties of "basic type"
final String path = embeddedAttributeName + '.' + propertyMemberDetails.getName();
final String attributeName = propertyMemberDetails.resolveAttributeName();
final String path = embeddedAttributeName + '.' + attributeName;
if ( attributeConversionInfoMap.containsKey( path ) ) {
return;
}
propertyMemberDetails.forEachAnnotationUsage( Convert.class, (usage) -> {
final AttributeConversionInfo info = new AttributeConversionInfo( usage, propertyMemberDetails );
attributeConversionInfoMap.put( propertyMemberDetails.getName(), info );
attributeConversionInfoMap.put( attributeName, info );
} );
}
@Override
protected AttributeConversionInfo locateAttributeConversionInfo(MemberDetails attributeMember) {
// conversions on parent would have precedence
return locateAttributeConversionInfo( attributeMember.getName() );
return locateAttributeConversionInfo( attributeMember.resolveAttributeName() );
}
@Override