Skip to content

JaVers runtime error - diff for Set of ValueObjects is not supported #191

@lathy88

Description

@lathy88

Recently i got this error,

can not handle managed/back reference 'defaultreference' in jackson for composite key
I googled alot but found the below option to use,

JsonManagedReference and JsonBackReference
Reference-> http://wiki.fasterxml.com/JacksonFeatureBiDirReferences

But my situation is,

Class Parent{
private int id;
@JsonManagedReference
Set childSet;
}

Class Child{
private ChildId childId;
private String name;
}

Class ChildId{
private int childKey;
@JsonBackReference
private Parent parent;
}
As you see, in the child class it has a composite key. I can not change this since it has relationship with DB.

Can anybody help me with this issue?

Note:
I'm using Jackson 2.4.3
I'm using Javers 1.2.9 for Object comparison

Update:

I removed all the JsonManaged and JsonBackReference annotations and added only JsonIgonre in Child as below,
Class ChildId{
private int childKey;
@JsonIgnore
private Parent parent;
}

After doing this I got the below error,

11:39:59,712 ERROR SetChangeAppender:46 - could not diff Field Set Child1; //declared in: Parent, JaVers runtime error - diff for Set of ValueObjects is not supported

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions