Removed unnecessary check for key of JPA entities.