Hibernate throws org.hibernate.TypeMismatchException: Provided id of the wrong type for class. Expected: class java.lang.Integer, got class java.lang.Long

Maybe you didn’t change it in the entity.