If you use WithLimits without a sort order, then it will act non-deterministically. This is because the database could sort the results in any random order if not constrained.
The fix is to default to sorting with primary key when using WithLimits. If there are no primary keys and no explicit sorting, then an exception should be thrown.
Make sure to update the documentation to note this.
If you use
WithLimits
without a sort order, then it will act non-deterministically. This is because the database could sort the results in any random order if not constrained.The fix is to default to sorting with primary key when using
WithLimits
. If there are no primary keys and no explicit sorting, then an exception should be thrown.Make sure to update the documentation to note this.