dentsusoken / iPLAss

Java-based open source low-code development platform for enterprise
https://iplass.org/
GNU Affero General Public License v3.0
67 stars 25 forks source link

CSVダウンロード、多重度複数の参照に対する条件が指定されている場合のソート条件を改善 #1135

Closed xkazama-yukio3 closed 1 year ago

xkazama-yukio3 commented 1 year ago

アップロード形式のCSVダウンロード時に、多重度複数の参照に対する条件が含まれていて、 かつ、件数制限が設定されているとSQLSeverの場合にデータが取得できなくなる。 (現状は、SQLServerの場合は件数制限しないように注記)

内部的な処理で distinct 指定 かつ orderby のクリアをしているため。

この改善のため、SQLServerの場合は、orderbyに oid を指定してダウンロードするようにする。 ただしSQLServerかの判定は直接的に行わず、CSVUploadServiceにフラグ mustOrderByWithLimit を追加して制御する。

xkazama-yukio3 commented 1 year ago

(English) When downloading CSV in upload format, if conditions for multiple references are included and specify the limit, SQLSever will not be able to retrieve the data. (Currently, do not specify limit in the case of SQLServer.)

This is because the internal process specifies distinct and clears orderby.

To improve this, in the case of SQLServer, specify oid in orderby and download the data. However, do not directly determine whether it is SQLServer or not, but add a flag mustOrderByWithLimit to CSVUploadService to control it.