Thomas Bosch (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5c19f84...
) *commented* on HHH-15929 (
https://hibernate.atlassian.net/browse/HHH-15929?atlOrigin=eyJpIjoiMDI1Zj...
)
Re: Mapping jsonb of different types in a class inheritance hierarchy does not work. (
https://hibernate.atlassian.net/browse/HHH-15929?atlOrigin=eyJpIjoiMDI1Zj...
)
With 6.2.0.CR3 the original problem still exists.
When I remove @Type(JsonType.class) from properties I still get {{Cannot construct
instance of org.hibernate.bugs.entities.PropertyTypeA (although at least one Creator
exists): no String-argument constructor/factory method to deserialize from String value
('
{"propertyA":"foo"}
')}}
When I add an empty constructor for PropertyTypeA that takes a String it works.
So my solution currently looks like this
public PropertyTypeA(String json) {
// Hibernate needs this constructor, but doesn't use it :-)
// See
https://hibernate.atlassian.net/browse/HHH-15929
}
🙂
(
https://hibernate.atlassian.net/browse/HHH-15929#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15929#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#100217- sha1:7167dc8 )