You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT statements without an ORDER BY clause are returned in an undefined order. This means any call with a LIMIT clause will return an unpredictable set of records. The obvious default order is the to sort by primary key ascending.
Current first will apply a default ordering, but not limit(20).fetch(), which is inconsistent.
Composite keys
It's unclear what the default ordering for a composite key table. Currently they are ordered by keys as specified.
Mapper.table('table').idAttribute('a','b').fetch()// select * from table order by a asc, b asc
Disabling
To disable default ordering there might be a helper method Mapper#any or Mapper#unordered (if there is indeed any case in which this is useful...)
The text was updated successfully, but these errors were encountered:
Default ordering
SELECT
statements without anORDER BY
clause are returned in an undefined order. This means any call with aLIMIT
clause will return an unpredictable set of records. The obvious default order is the to sort by primary key ascending.Current
first
will apply a default ordering, but notlimit(20).fetch()
, which is inconsistent.Composite keys
It's unclear what the default ordering for a composite key table. Currently they are ordered by keys as specified.
Disabling
To disable default ordering there might be a helper method
Mapper#any
orMapper#unordered
(if there is indeed any case in which this is useful...)The text was updated successfully, but these errors were encountered: