Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/Doc] Transient #939

Closed
xenoterracide opened this issue Mar 22, 2024 · 2 comments
Closed

[Feature/Doc] Transient #939

xenoterracide opened this issue Mar 22, 2024 · 2 comments
Labels

Comments

@xenoterracide
Copy link

Describe the bug

So, let's start with doc, there's no documentation for Transient https://jqno.nl/equalsverifier/errormessages/ ( did a ctrl+f )

For Feature. Per #935 I suggested that there has to be an in memory dirty tracking to avoid accidental missing updates when adding to a set

Steps to reproduce

structures are here

https://github.com/xenoterracide/spring-app-commons/tree/test/equalsverifier/module/jpa/src/test/java/com/xenoterracide/jpa

Error message and version number

java.lang.AssertionError: EqualsVerifier found a problem in class com.xenoterracide.jpa.FooAggregate.
-> Transient field dirty should not be included in equals/hashCode contract.

For more information, go to: https://www.jqno.nl/equalsverifier/errormessages
(EqualsVerifier 3.16, JDK 21.0.2 on Linux)

Code: EqualsVerifier invocation

    EqualsVerifier.forClass(FooAggregate.class)
      .withRedefinedSuperclass()
      .withPrefabValues(AbstractIdentity.class, FooAggregate.Id.create(), BarEntity.Id.create())
      .withPrefabValues(BarEntity.Id.class, BarEntity.Id.create(), BarEntity.Id.create())
      .withPrefabValues(FooAggregate.Id.class, FooAggregate.Id.create(), FooAggregate.Id.create())
      .withPrefabValues(BarEntity.class, BarEntity.create(null, "bar"), BarEntity.create(null, "baz"))
      .suppress(Warning.SURROGATE_OR_BUSINESS_KEY)
//      .suppress(Warning.TRANSIENT_FIELDS)
      .withOnlyTheseFields("id", "version", "dirty")
      .verify();

Code: class under test

No response

Additional context

No response

@xenoterracide xenoterracide changed the title Feature/Doc] Transient [Feature/Doc] Transient Mar 22, 2024
@jqno jqno added the accepted label Mar 23, 2024
@jqno
Copy link
Owner

jqno commented Mar 23, 2024

Sure, I can add a note for this specific error 👍🏼

@jqno
Copy link
Owner

jqno commented Mar 25, 2024

Added a note to the website

@jqno jqno closed this as completed Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants