Hi,
I am using version 2012-10-22 LGPL.
I have ListGrid with DataSource using two columns as primary key. The ListGrid can expand to show related records from another DataSource which also single primary key and two columns with foreignKey directed to first DataSource.
Unfortunately when expanding only first column with primaryKey is taken into consideration and expanded ListGrid show much to many records.
Actual result:
When expanding row in ListGrid related records are filtered only by "order_id".
Expected result:
Related records should be filtered by "order_id" and "product_id".
Best regards,
Janusz
I am using version 2012-10-22 LGPL.
I have ListGrid with DataSource using two columns as primary key. The ListGrid can expand to show related records from another DataSource which also single primary key and two columns with foreignKey directed to first DataSource.
Unfortunately when expanding only first column with primaryKey is taken into consideration and expanded ListGrid show much to many records.
Code:
DataSource.create({ ID: "orders_lines", fields: [ {name: "order_id", primaryKey: true}, {name: "product_id", primaryKey: true}, {name: "quantity"}, {name: "price"} ] }); DataSource.create({ ID: "orders_lines_items", fields: [ {name: "item_id", primaryKey: true}, {name: "order_id", foreignKey: "orders_lines.order_id"}, {name: "product_id", foreignKey: "orders_lines.product_id"}, {name: "reservered"} ] }); ListGrid.create({ dataSource: "orders_lines", canExpandRecords: true, expansionMode: "related", detailDS: "orders_lines_items" });
When expanding row in ListGrid related records are filtered only by "order_id".
Expected result:
Related records should be filtered by "order_id" and "product_id".
Best regards,
Janusz
Comment