-
-
Notifications
You must be signed in to change notification settings - Fork 142
@JsonManagedReference doesn't work on Scala's collections #210
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
Comments
This is the correct place for this issue. The Scala module will need to add support for |
Not sure if it could help but Scala collections are considered "collection-like" (and Maps "map-like"), via |
None of the Scala collections implement any of the Java interfaces. If databind could use the "collection-like" and "map-like" properties, rather than |
Hmmh. Very unfortunate that The challenge wrt |
Sample code snippet
REPL:
Exception occuried:
root cause
ManagedReferenceProperty.setAndReturn @ jackson-databind try to populate the parent instance to all its children but only cover the container types of Java Array, Collection and Map.
Since almost all the Scala collections have not implemented Java Collection or Map interface, like the Seq here in the sample, the exception thrown.
In fact, I was wondering where should I raise this issue, to jackson-module-scala or jackson-databind ? I don't know but please allow me to paste it here firstly since you guys may be more familiar with Scala.
Anyway, hope that my analyze can help and the issue can be fixed by FasterXML in later release:)
The text was updated successfully, but these errors were encountered: