play-authenticate icon indicating copy to clipboard operation
play-authenticate copied to clipboard

Change Password never persists because of lack of setters?

Open jenshuehn opened this issue 6 years ago • 1 comments

Hey. Recently, I faced a strange issue and I am not sure where this came from:

Based on the sample app, my application did not persist the password set using User::changePassword. In the end I removed the public field access with a setter method and then it worked.

Old code in User::changePassword which did not work: a.providerUserId = authUser.getHashedPassword(); New code: a.setProviderUserId(authUser.getHashedPassword());

Version used: Play 2.6.21.

All the best. Jens

jenshuehn avatar Apr 19 '19 10:04 jenshuehn

Looks like the root of this problem is Ebean ORM which does not mark the entity as "dirty" in first case

Shenker93 avatar Apr 19 '19 10:04 Shenker93