SaveOrUpdate calls Save (which is insert) if the object's ID is the same as the unsaved value. It calls Update (which does an update) if the object's ID is not the same.
Since you're setting unsaved-value=any, it will always think it's an insert and not an update.
Can you provide your mapping as well and what you're actually trying to do?
If, for example, your ID is an auto-increment field in the database, then your unsaved-value should be 0. This will tell it to perform an insert when the ID is 0... it will then update the ID. Any subsequent calls to SaveOrUpdate would perform an update.
|