While analyzing some design rules with design tests for persistent classes, I discovered that 91% of a sample of 40 projects from GitHub don't follow the rule about the implementation of the equals/hashCode methods.
These rules are in the documentation of Hibernate (subsection 2.1.5 chapter 2). The first one states that the equals/hashCode methods must be implemented and the second one that their implementation must not access the identifying property. 66% of the projects violate the first rule and 25% violate the second one.
How do you use the framework Hibernate / JPA. I would like to ask two questions:
Do you think these software projects have latent bugs caused by the design rules violations or is the rule unnecessary?
Did your development team discusses about the recommendations for use of Hibernate / JPA?
There are also other rules that they aren't being followed. For more details about the experiment with others results, access: http://tacianosilva.github.io/designtests
Hi,
While analyzing some design rules with design tests for persistent classes, I discovered that 91% of a sample of 40 projects from GitHub don't follow the rule about the implementation of the equals/hashCode methods.
These rules are in the documentation of Hibernate (subsection 2.1.5 chapter 2). The first one states that the equals/hashCode methods must be implemented and the second one that their implementation must not access the identifying property. 66% of the projects violate the first rule and 25% violate the second one.
How do you use the framework Hibernate / JPA. I would like to ask two questions:
Do you think these software projects have latent bugs caused by the design rules violations or is the rule unnecessary?
Did your development team discusses about the recommendations for use of Hibernate / JPA?
There are also other rules that they aren't being followed. For more details about the experiment with others results, access: http://tacianosilva.github.io/designtests
Thanks in advance!