Hi, I'm using Hibernate 3.0 and I have noticed that if I try to update an object using
session.update(Object obj)
and there is currently no corresponding database record for that object, the update executes successfully anyway! No record is added but I would have expected that calling update for an object with no corresponding db record would throw an exception - n'est pas? Is this a bug or am I missing something? Surely you cannot update an object/record that hasn't already been persisted?
If there is a record matching the Id of the object, then that record does get updated successfully.
|