[hibernate-issues] [JIRA] (HHH-13913) AttributeConverter with autoApply is not chosen for generic typed fields

Christian Koppen (JIRA) jira at hibernate.atlassian.net
Sat Mar 28 05:10:50 EDT 2020


Christian Koppen ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5b349655349a91633c1ba9bc ) *commented* on HHH-13913 ( https://hibernate.atlassian.net/browse/HHH-13913?atlOrigin=eyJpIjoiZTg5N2RmNTZhNmQ2NDY2Mjg5MjAzY2JjNWFmMTAzNzYiLCJwIjoiaiJ9 )

Re: AttributeConverter with autoApply is not chosen for generic typed fields ( https://hibernate.atlassian.net/browse/HHH-13913?atlOrigin=eyJpIjoiZTg5N2RmNTZhNmQ2NDY2Mjg5MjAzY2JjNWFmMTAzNzYiLCJwIjoiaiJ9 )

If you replace AutoApplicableConverterDescriptorStandardImpl.java#L123 ( https://github.com/hibernate/hibernate-orm/blob/5.4.11/hibernate-core/src/main/java/org/hibernate/boot/model/convert/internal/AutoApplicableConverterDescriptorStandardImpl.java#L123 ) by the following code, the type is resolved properly, the converter is found and the problem does not occur:

Type javaType = ((JavaXProperty) xProperty).getJavaType();
ResolvedType resolvedType = classmateContext.getTypeResolver().resolve(javaType);
ResolvedField resolvedField = new ResolvedField(
   resolvedMember.getDeclaringType(),
   resolvedMember.getAnnotations(),
   resolvedMember.getRawMember(),
   resolvedType);
return resolvedField;

( https://hibernate.atlassian.net/browse/HHH-13913#add-comment?atlOrigin=eyJpIjoiZTg5N2RmNTZhNmQ2NDY2Mjg5MjAzY2JjNWFmMTAzNzYiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13913#add-comment?atlOrigin=eyJpIjoiZTg5N2RmNTZhNmQ2NDY2Mjg5MjAzY2JjNWFmMTAzNzYiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100122- sha1:38c716d )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200328/d685bc0a/attachment.html 


More information about the hibernate-issues mailing list