-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19964 Allow json serialization of Object valued attribute #11369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@beikov removing the Object type check on the FormatMapper toString/fromString methods makes it work, but with some noteworthy restrictions: |
I'd say this is fine. What will happen during serialization/deserialization is up to the
That is also expected. JSON obviously only knows "object" and "array" and it is up to the configured
I don't think we can improve anything, nor should we. These "restrictions" are fine IMO and simply a result of the fact that a user chose to statically type |
hibernate-core/src/main/java/org/hibernate/type/format/AbstractJsonFormatMapper.java
Show resolved
Hide resolved
d97ffb6 to
259604d
Compare
...c/test/java/org/hibernate/orm/test/inheritance/discriminator/SingleTableAndGenericsTest.java
Show resolved
Hide resolved
259604d to
eeae41a
Compare
|
Waiting for resolution of https://hibernate.atlassian.net/browse/HHH-18572 to move this forward |
hibernate-core/src/main/java/org/hibernate/type/format/AbstractJsonFormatMapper.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jan Schatteman <[email protected]>
eeae41a to
65fdf11
Compare
|
Seems Oracle 19c doesn't like the changes in the test class. Can you please investigate by using e.g. Oracle 18 XE? |
…e mapping Signed-off-by: Jan Schatteman <[email protected]>
65fdf11 to
862aaa2
Compare
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19964