Skip to content
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

KMongo unable to save field with name "isClosed" and type "String" #374

Open
himanshuvaish93 opened this issue Sep 22, 2022 · 3 comments
Open

Comments

@himanshuvaish93
Copy link

himanshuvaish93 commented Sep 22, 2022

Hi Team,

I have observed that when we are trying to save a document using kmongo methods, field "isClosed" is ignored if it is of type String.
However same field name with Boolean data type works.
Also, if document contains an additional field with name "closed" and type String along with "isClosed", it doesn't save "closed" and rather saves "isClosed".
We have a use case where we need to persist isClosed field name but facing issue.

Is this something which is expected or isClosed as string is some keyword ?

@zigzago
Copy link
Member

zigzago commented Sep 26, 2022

Indeed there is a bug.
Workaround: data class Test1(@get:JsonProperty("isClosed") val isClosed:String)

@zigzago
Copy link
Member

zigzago commented Sep 26, 2022

Looks like a bug in jackson-module-kotlin lib FasterXML/jackson-module-kotlin#575

@himanshuvaish93
Copy link
Author

Thank you for reviewing. We are using the workaround for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants