在 LDW 模式下使用 TFDTable 时,对字段进行降序排序会导致重复行。例如:
TFDTable.TableName is set to a VIEW name (not a tablename)
TFDTable.UpdateOptions.KeyFields is set to the primary key in the VIEW base table.
TFDTable.IndexFieldNames is set to 'PERS_NAME:A'.
显示正确的结果集,没有任何重复。如果我将IndexFieldnames 更改为 'PERS_NAME:D',则视图返回的每条记录都会显示两次或树次。
如何避免这些重复?它仅在按降序对表格进行排序时发生,无论我使用哪个字段进行排序。
更新: 您可以在 github 上找到重现问题的示例项目:https ://github.com/cytrinox/firedac-sort-issue 或通过https://github.com/cytrinox/firedac-sort-issue下载项目/archive/master.zip