Skip to content

Grail 3.1 empty list is saving as null in mongodb #14400

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

Open
zaid2130 opened this issue Nov 27, 2018 · 0 comments
Open

Grail 3.1 empty list is saving as null in mongodb #14400

zaid2130 opened this issue Nov 27, 2018 · 0 comments

Comments

@zaid2130
Copy link

Hey, I am using grails 3.1. In this version, by default mongo is using MongoCodecSession but I have convertd it to MongoSession for some reason. Now when I am saving my domain instance in mongodb, it is saving empty list as null values which causes problem is $push. Below is my saving code

if(commit){
instance.save(flush: true)
instances.add(instance)
}

Any help?

@jdaugherty jdaugherty transferred this issue from grails/grails-data-mongodb Mar 13, 2025
@jdaugherty jdaugherty transferred this issue from apache/grails-data-mapping Apr 22, 2025
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