Is isDirty()
method not supported in grails mongodb plugin? I saw a comment in this link but it was commented 2 years ago. Just to know, if current version supports it?
Using grails 2.3.5 with mongodb 3.0.1 and no hibernate installed.
Is isDirty()
method not supported in grails mongodb plugin? I saw a comment in this link but it was commented 2 years ago. Just to know, if current version supports it?
Using grails 2.3.5 with mongodb 3.0.1 and no hibernate installed.
Okay got it working. It works but has a different behavior. If an existing property is binded & there is no any change in the value after binding then, isDirty()
returns true. But if property is not at all binded then isDirty()
works fine.
Why not write something like User.collection?.findOne(this.id)?.password != password
. It detects if the password
field has changed.