Grails 3.1 - Null properties of domain instance is saving in mongodb

95 views Asked by At

I am saving instance in mongodb but getting some null properties saved. I have used below configuration in Application.yml to use MongoSession

grails:
mongodb:
   engine: mapping

I am using below code for saving my instance but it was saving null properties of instance also, which I don't want.

instance.save(validate: false, flush: true)

Thanks for the help in advance!

0

There are 0 answers