jnosql
jnosql copied to clipboard
Pass the Document to the custom AttributConverter when converting att…
…ribute is not primitive type.
Currently the enclosed value is passed to the converter, what is good for the primitive types, but in a case of the entity a list of properties is passed (List<Document>) which is counterintuitive. The Value would also be an option, but the Document is more similar to the TypeReferenceReader.
Can one of the admins verify this patch?
@redmitry thank you for the contribuition. What do you think if we include a test scenario here?
Hi Otavio,
I attach some example of what I supposed to do. Unfortunately I found no solution to use @Convert for the entities. The deserialization is a pain without an access to the DocumentEntityConverter which is the other module. Another issue (for the polymorphism) is that I can't skip serialization. I would suppose be able to skip it in some way... Unfortunately, the only mechanism left is via TypeReferenceReader ... (is any TypeReferenceWriter?).
I suggest dismiss this patch as it doesn't put any value.
Kind regards,
Dmitry
Hey @redmitry I'll merge it on a PR.