Closed cowtowncoder closed 12 years ago
Implemented by adding a new annotation:
'@JsonIdentityReference`
to be used on property. Created separate annotation so that basic identity info definition can be separate from details of how references are configured.
Current behavior for Object Id serialization is to serialize first instance normally, and then serialize all the other references as ids. This makes sense when data must be self-contained, i.e. fully deserializable without any external information.
However, there are cases where it would make sense to serialize ALL instances as just id; this makes sense if deserialization side knows how to map these ids externally to instances, without requiring them to be included in serialization.