- Small fix to MsSQL repository

This commit is contained in:
mcndave committed 2022-07-18 17:28:53 +00:00
1 parent e97df353ae
commit dfb84c104d
1 file changed
+4 -2
+4 -2
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)");
}
}
}