Closed
Description
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"
}
}