JsonMappingException: Already had POJO for id
To avoid id conflict try to use ObjectIdGenerators.PropertyGenerator.class
or ObjectIdGenerators.UUIDGenerator.class
instead of ObjectIdGenerators.IntSequenceGenerator.class
You should use scope
parameter when annotating the ids. Then the de-serializer would make sure the id is unique within the scope.
From Annotation Type JsonIdentityInfo
:
Scope is used to define applicability of an Object Id: all ids must be unique within their scope; where scope is defined as combination of this value and generator type.
e.g.
@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class,property="@id", scope = Account.class)