I'm trying to update an embedded object but when the object is updated, the password user is encoded again.
I would like to update the Card object into User class. The UserService should only update the card object but it's updating the password object.
UserPasswordEncoderListener is default from grails spring security core plugin.
Using:
- grailsVersion=3.3.8
- grailsWrapperVersion=1.0.0
- gormVersion=6.1.10.RELEASE
- gradleWrapperVersion=3.5
- mongodb:6.1.6
Any idea? or what I'm doing wrong? What is the best way to handle the embedded object?
User class
Customer class
Card class
UserService class
UserPasswordEncoderListener
Looks like the password is also updated somewhere, so
u.isDirty( 'password' )
in UserPasswordEncoderListener returnstrue
.You should be able to suppress password update by setting it to
null
.