You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remember, you have the problem right in front of you. I have to try and reproduce it in my spare time. Please help me, so that I can help you!
Error message
java.lang.AssertionError: EqualsVerifier found a problem in class com.whitewall.integrationapi.order.domain.JpaEntity.
-> Cannot subclass primitive, array or final types: class com.whitewall.integrationapi.order.domain.JpaEntity
Expected behavior
The test should still pass as in prior version - or give a hint how to fix the test.
The exception disappears when also suppressing Warning.JPA_GETTER - but I am not sure about the implications.
Version
Test OK in 3.15.4. fails in 3.15.5 - 3.15.7
The text was updated successfully, but these errors were encountered:
Found the problem. EqualsVerifier considers a field marked with @GeneratedValue to be lazy, and applies its lazy field checks for that field. In that case, it assumes the entity is non-final (because Hibernate would also create a subclass to handle lazy loading of those fields). Your entity, however, is final. I didn't know that was allowed when there's a field with @GeneratedValue, but I'll just assume that it is, since you're obviously using that 😄
I've found a fix, too. I'll make a release later today.
Describe the bug
Since version 3.15.5 equalsVerifier fails to validate one of my entity classes.
Code that triggers the behavior
Entity class:
test case:
Remember, you have the problem right in front of you. I have to try and reproduce it in my spare time. Please help me, so that I can help you!
Error message
java.lang.AssertionError: EqualsVerifier found a problem in class com.whitewall.integrationapi.order.domain.JpaEntity.
-> Cannot subclass primitive, array or final types: class com.whitewall.integrationapi.order.domain.JpaEntity
Expected behavior
The test should still pass as in prior version - or give a hint how to fix the test.
The exception disappears when also suppressing
Warning.JPA_GETTER
- but I am not sure about the implications.Version
Test OK in 3.15.4. fails in 3.15.5 - 3.15.7
The text was updated successfully, but these errors were encountered: