ResponseEntity incorrectly maps values
I have two entities: Product and Variant. Each product has a set of Variant. To get a product, I have a controller endpoint:
Hence to call a product, I'll have to call this endpoint:
Well, I have tried debugging the problem and even explicitly serializing the objects before I pass it to the ResponseEntity's body, none works. Images attached described my attempt on verifying whether the object passed to the
http://localhost:8081/api/products/{id}Hence to call a product, I'll have to call this endpoint:
Well, I have tried debugging the problem and even explicitly serializing the objects before I pass it to the ResponseEntity's body, none works. Images attached described my attempt on verifying whether the object passed to the
.body was changed:Left picture: I explicitly serialize it and debugging the output to the console. You can see that the serialization process works correctly.
Right picture: I only printed the first and last variant id of the product's variants. It resulted in the correct return of variant ids.

