We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
it causes unexpected nulls in Shadows, reproduction scenario:
class CaseShadowWithPropertyName extends Specification { class Entity { @Id int id @PropertyName("otherField") String someField } def "should use @PropertyName when creating Shadows"(){ given: def javers = JaversBuilder.javers().build() def e = new Entity(id:1, someField: "s") javers.commit("author", e) when: def shadow = javers.findShadows(QueryBuilder.byInstance(e).build()).get(0).get() then: shadow instanceof Entity shadow.id == 1 shadow.someField == "s" } }
The text was updated successfully, but these errors were encountered:
Is last line in then section correct? Did you mean shadow.someField == "s" or shadow. otherField == "s" ?
then
shadow.someField == "s"
shadow. otherField == "s"
Sorry, something went wrong.
yes, it's correct. shadow.someField isn't populated
The simplest workaround is to annotate field with Gson annotation @SerializedName("otherField") but it's not final solution for sure.
@SerializedName("otherField")
fix released in 3.5.2
No branches or pull requests
it causes unexpected nulls in Shadows, reproduction scenario:
The text was updated successfully, but these errors were encountered: