Don't attempt to update a user record if none of their fields were

modified.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@735 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2002-05-11 20:31:59 +00:00
parent 6839412758
commit 12b519a5b8
@@ -1,5 +1,5 @@
// //
// $Id: UserRepository.java,v 1.21 2002/05/08 00:25:54 shaper Exp $ // $Id: UserRepository.java,v 1.22 2002/05/11 20:31:59 mdb Exp $
// //
// samskivert library - useful routines for java programs // samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne // Copyright (C) 2001 Michael Bayne
@@ -273,6 +273,11 @@ public class UserRepository extends JORARepository
public void updateUser (final User user) public void updateUser (final User user)
throws PersistenceException throws PersistenceException
{ {
if (!user.getDirtyMask().isModified()) {
// nothing doing!
return;
}
execute(new Operation () { execute(new Operation () {
public Object invoke (Connection conn, DatabaseLiaison liaison) public Object invoke (Connection conn, DatabaseLiaison liaison)
throws PersistenceException, SQLException throws PersistenceException, SQLException