Stefan Ocke (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMTgwZDM1MmQ3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14063?atlOrigin=eyJpIjoiMTgwZD...
) HHH-14063 (
https://hibernate.atlassian.net/browse/HHH-14063?atlOrigin=eyJpIjoiMTgwZD...
) @Convert annotation on Embeddable nested in Embeddable in an ElementCollection does not
work (
https://hibernate.atlassian.net/browse/HHH-14063?atlOrigin=eyJpIjoiMTgwZD...
)
Change By: Stefan Ocke (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
I have re-tested [HHH-10857] with Hibernate 5.4.15:
* For “simple” Embeddables (directly used in the Entity as @Embedded), @Convert annotation
works.
* For Embeddables in ElementCollections, @Convert annotation also works now. So, the
original issue [HHH-10857] seems to be fixed.
* However, in the following situation, @Convert is still ignored:
** I have an Element Collection of an Embeddable OuterEmbeddable.
** “OuterEmbeddable“ contains another Embeddable called InnerEmeddable
** Within InnerEmeddable I use @Convert on basic fields. But it is ignored.
My current workaround is to use @Convert one level higher:
{code:java}@Embeddable
class OuterEmbeddable{
@Convert(converter = MyConverter.class, attributeName = "theFieldToConvert")
InnerEmeddable theInnerEmbeddable
}{code}
My testcase reveals some more details:
* It works if I enforce field level access on the embeddables by
“(a)Access(AccessType.xn--field)-ui0c
* The error occurs (but only on the inner embeddable , as described above ) if I do not
enforce field level access.
(
https://hibernate.atlassian.net/browse/HHH-14063#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14063#add-comment?atlOrigin=ey...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100128- sha1:85a81c0 )