Commiting a list of objects from another entity

I am retrieving a list of objects from an entity which is passed as parameter (in this case ‘Cart’). I am iterating through every object in it which is of ‘Product’ entity type and storing it in ‘Orders’ entity. I am commiting the changes afterwards. Now I when I’m trying to display the data of ‘Orders’ entity by data view of ‘Order’ and list view with source as ‘Association over Product’ entity, there is no output.  I’m attaching screenshots.    
1 answers

Hi Sashank,

I see that in the loop you are creating a new product object, shouldn't you change the iterator product here instead of creating a new one?

I assume that you pass the order you created to the page and want use this to retrieve the products. In the create products action in the loop, do you set the association between the products you create and the order? 

Also are the newly created products committed anywhere?

Hope this helps!