Hibernate duplicate entry fix.