Given an entity class with a composite key that is controlled by hibernation, is there an easy way to smooth out the key properties in the object itself?
Given:
{ "key": { "field1": 1, "field2": 2 }, "prop": "value" }
I would prefer it to be serialized as:
{ "field1": 1, "field2": 2, "prop": "value" }
I really do not want to implement JsonSerializableWithType , since it is fine at the moment, it is just a key class, I want the fields to be flattened.
source share