Hello. It`s small, but very confusing bug. I have 1 entity class with PK. In code i create new entity, but not save it to database (my bug). After that i make some entity changes and try to update it. I think entity already saved, but not. Hibernate generate update query with "where id=null" and PgSQL return 0 updated rows. By this condition, Hibernate throws:
Exception class very confusing, I some time search reason of lock. Only after deep debugging i found wrong update query with id=null.