GEM: 定型検索でカラム以外の式をOrder Byに設定した場合、実行時エラー#2039
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
定型検索(GEM)の検索クエリ生成において、ORDER BY に「カラム以外の式」(例: case when ... end)を指定した場合に、実行時に EntityField 変換で落ちる問題(#1960)を回避するための修正です。
Changes:
ORDER BYの sortKey をtoString()で文字列化してEntityField化するのをやめ、ValueExpressionとしてSELECT句に取り込むように変更SELECT句の選択要素をStream.concat(...).distinct()で統合して生成するよう整理
added 2 commits
April 21, 2026 19:04
f3eaaac to
e200b84
Compare
added 2 commits
April 22, 2026 13:18
This reverts commit e200b84.
yuichi-github
approved these changes
Apr 22, 2026
ff51901 to
1e8d345
Compare
This was referenced Apr 23, 2026
xtakahashi-hiroyuki
added a commit
that referenced
this pull request
Apr 24, 2026
* GEM: 定型検索でカラム以外の式をOrder Byに設定した場合、実行時エラー (#2039) * OrderByで式を指定した場合のエラー解消 * [refactor] 不要なoverride削除 * Revert "[refactor] 不要なoverride削除" This reverts commit e200b84. * レビュー対応:distinct時のSELECT列決定ロジックを改善 --------- Co-authored-by: Takahashi.Hiroyuki <xtakahashi.hiroyuki4@contract.dentsusoken.com> * import追加 * Java 11 記法に修正 * レビュー対応:Java 8 API を使うように --------- Co-authored-by: Takahashi.Hiroyuki <xtakahashi.hiroyuki4@contract.dentsusoken.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
対応内容
closes #1960
動作確認・スクリーンショット(任意)
以下の条件分岐を網羅して動作確認(結果が正常に返る/ソート成功)した。
レビュー観点・補足情報(任意)