I have a Product entity, and a ProductList entity.
Is it possible to serialize (and deserialize) a ProductList object to json in a way that the json contains the Product objects related to that ProductList?
The expected output is:
[{
'product_list_name': 'List',
'product_list_created': '2013-07-04',
'products' : {
'product': {...},
'product': {...},
'product': {...},
'product': {...}
}]
I'm using the Symfony2 built-in serializer and JMS\Serializer but I am not having any luck.
Any way to do this?