Guest User

Untitled

a guest
Jan 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[OptimisticLockException: Data has changed. updated [0] rows sql[update manager set modification_time=?, session_id=?, expiration_date=? where id=? and rating=? and creation_time=? and modification_time=? and name=? and surname=? and login=? and password_hash=? and email=? and session_id=? and expiration_date=?] bind[null]]]
  2.  
  3. public class Manager extends Model {
  4. @Getter @Setter
  5. Long id;
  6.  
  7. @Getter @Setter
  8. private String name;
  9.  
  10. @Getter @Setter
  11. private String surname;
  12.  
  13. @Column(unique = true)
  14. @Getter @Setter
  15. private String login;
  16.  
  17. @Getter @Setter
  18. private String passwordHash;
  19.  
  20. @Getter @Setter
  21. private String email;
  22.  
  23. @Embedded
  24. @Getter @Setter
  25. private ManagerSession session;
  26.  
  27. @Getter
  28. private Timestamp creationTime;
  29.  
  30. @Getter
  31. private Timestamp modificationTime;
  32.  
  33. @Override
  34. public void save() {
  35. this.creationTime = new Timestamp(System.currentTimeMillis());
  36. this.modificationTime = new Timestamp(System.currentTimeMillis());
  37. super.save();
  38. }
  39.  
  40. @Override
  41. public void update() {
  42. this.modificationTime = new Timestamp(System.currentTimeMillis());
  43. super.update();
  44. }
  45.  
  46. }
Add Comment
Please, Sign In to add comment