Hi,
I have three tables:
Purchase, Product & ProductType
Every Purchase has a Product (telling me which product was purchased) and each Product has a ProductType (telling me of which type the product is).
I have a grid showing the purchases of a customer and in the columns I show the product name and product type name. By using $expand I can easily include the Product and ProductType entities.
Now I also want to use the Export function (to CSV and Excel). The problem is that the selected columns here behave differently compared to the selected columns of the grid. In my export code, I have defined $expand = Product,Product.ProductType (same as in the main query for the grid) and $select = PurchaseNo, Product.Name, Product.ProductType.Name
This causes an AmbigiousMatchException. As soon as I remove the Product.ProductType.Name from the $select, it works but of course the name of the product type is not shown then which is what I need.
Any idea why this works fine in the datagrid but not in the export method?
Thanks for your suggestions!