- Small fix to MsSQL repository

This commit is contained in:
Dave M. 2022-07-18 17:28:53 +00:00
parent e97df353ae
commit dfb84c104d
1 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,10 @@ class MssqlRepository extends Repository {
protected function finalizeQuery() : void
{
if ( null === $order = $this->queryBuilder->getFragment(Query\OrderBy::class) ) {
$this->orderBy("(SELECT 0)");
if ( $this->queryBuilder->getFragment(Query\MsSQL\Offset::class) ) {
if (null === $order = $this->queryBuilder->getFragment(Query\OrderBy::class)) {
$this->orderBy("(SELECT 0)");
}
}
}