Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3744

I'm having a Problem with MJoin

$
0
0

I started to look at the MJoin functionality today (following this example: https://editor.datatables.net/manual/net/mjoin) and ran into a problem. Here's my code:

        .MJoin(new MJoin("Finish")
                    .Link("Product.Id", "ProductFinish.ProductId")
                    .Link("Finish.Id", "ProductFinish.FinishId")
                    .Model<JoinFinishModel>()
                        .Field(new Field("Id")
                            .Options("Finish", "Id", "Name"))
                    )

The error I get back is: {"draw":null,"data":[],"recordsTotal":null,"recordsFiltered":null,"error":"Join was performed on the field 'Product.Id' which was not included in the Editor field list. The join field must be included as a regular field in the Editor instance.","fieldErrors":[],"id":null,"meta":{},"options":{},"files":{},"upload":{"id":null}}

I have tried adding in "Product.Id" as member of my ProductModel but that didn't do the trick either .Field(new Field("Product.Id"))

It might be worth noting that "Product.Id" is a GUID field (not sure if that makes a difference)

Any help will be greatly appreciated.


Viewing all articles
Browse latest Browse all 3744