I have two objects from database (in database it is same object), but they have different hashes:
GroupType groupType = groupTypeDao.findById(3);
GroupType groupType1 = groupTypeDao.findById(3);
System.out.println(groupType);
System.out.println(groupType1);
I get this output:
GroupType@6040
GroupType@6041
Why is that? Technology stack: Spring, JavaFX, Hibernate.
I have another project with Spring and Hibernate. Configuration files are identical in the two projects. Hibernate version is identical also. But in another project this produce same hashcodes.