-
Notifications
You must be signed in to change notification settings - Fork 106
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
Should ignore org.hibernate.bytecode.internal.javassist.FieldHandled.getFieldHandler() #72
Comments
Thank you for reporting this. From the article, it sounds like version 4.2.8 of Hibernate and above may be affected. I'll have to think about the best way to approach this: mix-in is one possibility, but perhaps "ignore type" could also work, to drop the property with |
Based on git history, https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/FieldHandled.java has existed since Hibernate 4.0 and continues to exist in Hibernate 5. So I think it's safe to ignore its fields for all Hibernate 4 and 5 versions. |
Ok makes sense; thank you for verifying. |
This would be easyish to implement if [https://github.com/FasterXML/jackson-databind/issues/861] was implemented. Until then, should be relatively easy to implement by making In fact, the bigger piece that is needed is really the unit test to verify the fix. |
Ok. I added possible fix for annotation introspectors, but unfortunately I have no way to test whether that actually works. If fix does not work a unit test would be welcome, and issue may be reopened. |
Oy vey. As per #86, this type is now removed from Hibernate 5.1. |
When using bytecode enhancement, Hibernate classes get a new field, "fieldHandler" from the org.hibernate.bytecode.internal.javassist.FieldHandled interface. You can see how to set up bytecode enhancement and see what the generated code looks like at http://vladmihalcea.com/2014/09/08/hibernate-bytecode-enhancement/
This field should not be serialized/deserialized by Jackson.
Here's the module I've made to workaround this:
The text was updated successfully, but these errors were encountered: