hibernate tweaks

This commit is contained in:
Athou
2013-06-06 09:54:17 +02:00
parent c907abbf62
commit be6db080fd
18 changed files with 40 additions and 56 deletions

View File

@@ -56,7 +56,7 @@ public class UserService {
user.getPassword(), user.getSalt());
if (authenticated) {
user.setLastLogin(Calendar.getInstance().getTime());
userDAO.update(user);
userDAO.saveOrUpdate(user);
return user;
}
}
@@ -85,7 +85,7 @@ public class UserService {
for (Role role : roles) {
user.getRoles().add(new UserRole(user, role));
}
userDAO.save(user);
userDAO.saveOrUpdate(user);
return user;
}