-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
No Object Id found for an instance when using @ConstructorProperties #1367
Comments
One comment: you usually should not use
on tests, as it tends to hide legitimate problems. It can be useful in production systems, to avoid errors from changing data definitions, but in tests it tends to more hassle than worth. Anyway, thank you for reporting this, will look into the issue. |
I can reproduce this issue. Test seems to have minor flaw in that |
Would it make sense to add a deserialization feature for this case which would enable us to turn off this exception? Something like DeserializationFeature.FAIL_ON_NO_OBJECT_ID_FOUND or something to that effect? |
@kajo-bellabeat There is But I'll want to first figure out what is going with the real issue of failing even in presence of the id, and we'll see if there are other potential concerns left. |
any development here? |
@vnnv haven't worked on this one at all, no update from me. |
Big thanks to @diegode for providing the fix; I merged it in for 2.7.9 / 2.8.7 |
Hi! We recently migrated from 2.4.6. to 2.8.1. and we encountered the issue. We use lombok's
@AllArgsConstructor
which adds@ConstructorProperties
to constructor. We also used@JsonIdentityInfo
on our POJO which lead toJsonMappingException: No Object Id found for an instance
exception.The following test code demonstrates the issue
Stack trace
Prior to the version 2.5.0 this was not an issue, because the offending method (
com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer.handleIdValue(DeserializationContext, Object)
) had a comment// TODO: is this an error case?
and did nothing else.The text was updated successfully, but these errors were encountered: