I Don´t think this is what the hibernate documentation says about saveOrUpdate()
Code:
saveOrUpdate() does the following:
• if the object is already persistent in this session, do nothing
• if another object associated with the session has the same identifier, throw an exception
• if the object has no identifier property, save() it
• if the object's identifier has the value assigned to a newly instantiated object, save() it
• if the object is versioned (by a <version> or <timestamp>), and the version property value is the same
value assigned to a newly instantiated object, save() it
• otherwise update() the object
Since your object has no identifier it wil always create a new one
you would have to do a search in your table to see if the user exists....