Commit 8aa7100
fix: map empty attribute to _id in Mongo::getInternalKeyForAttribute
Query::orderAsc() with no attribute produces an empty string. SQL
adapters treat this as a no-op ORDER BY on the auto-increment key,
but Mongo built an invalid sort on '' causing queries to hang.
Map '' -> '_id' alongside '$sequence' so empty orderAsc() sorts by
the MongoDB sequence key, matching SQL adapter behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 19305fc commit 8aa7100
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1978 | 1978 | | |
1979 | 1979 | | |
1980 | 1980 | | |
1981 | | - | |
| 1981 | + | |
1982 | 1982 | | |
1983 | 1983 | | |
1984 | 1984 | | |
| |||
0 commit comments