My entity classes use the @Id or the @IdClass (for composite keys) annotation for comparison on JPA level. But now I want the entity classes itself to be comparable via an equals method.
My idea is to autogenerate those equals-methods and use them for testing, whether all values are set correctly in the entity file (against a manually generated one). In the productive scenario only a comparison of the keys is desired
Is there any interference between the @Id/@IdClass annotation for comparing tables on JPA site and my equals approach for testing?
Note: This equals method is a different one from the method I created in the composite key class of the @IdClass annotation.
Thank you