[hibernate-issues] [JIRA] (HHH-10857) @Convert annotation on attribute of @Embeddable does not work

Stefan Ocke (JIRA) jira at hibernate.atlassian.net
Mon Jun 8 11:19:16 EDT 2020


Stefan Ocke ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aa6f955d5-ad1a-4a8f-ad2f-49abbfc72b94 ) *commented* on HHH-10857 ( https://hibernate.atlassian.net/browse/HHH-10857?atlOrigin=eyJpIjoiNzA0NzNlZmExZmRhNDQ5MmI1NGFkOTEyYmVjOTIzMjciLCJwIjoiaiJ9 )

Re: @Convert annotation on attribute of @Embeddable does not work ( https://hibernate.atlassian.net/browse/HHH-10857?atlOrigin=eyJpIjoiNzA0NzNlZmExZmRhNDQ5MmI1NGFkOTEyYmVjOTIzMjciLCJwIjoiaiJ9 )

I observed this issue with nested Embeddables. That is, I have Embedded (not ElementCollection) as above.

Within this Embedded, there is again an Embedded.

In this second Embeddable, the Convert annoation has no effect.

My current workaround is to use the convert annoation one level higher:

@Embeddable
class OuterEmbeddable{
 @Convert(converter = MyConverter.class, attributeName = "theFieldToConvert" )
 InnerEmeddable theInnerEmbeddable
}

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

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#100128- sha1:078e4e4 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200608/755f436e/attachment.html 


More information about the hibernate-issues mailing list