fix(mssql): do not needlessly qualify columns in ProjectRoleRestrictionModel

this allows the ORM to properly escape the rule column
needed on MSSQL as it is a reserved word
This commit is contained in:
Joe Nahmias
2022-07-10 19:55:59 -04:00
committed by Frédéric Guillot
parent cf739273d5
commit 29df527979

View File

@@ -66,10 +66,10 @@ class ProjectRoleRestrictionModel extends Base
$restrictions = $this->db
->table(self::TABLE)
->columns(
self::TABLE.'.restriction_id',
self::TABLE.'.project_id',
self::TABLE.'.role_id',
self::TABLE.'.rule'
'restriction_id',
'project_id',
'role_id',
'rule'
)
->eq(self::TABLE.'.project_id', $project_id)
->findAll();
@@ -93,10 +93,10 @@ class ProjectRoleRestrictionModel extends Base
return $this->db
->table(self::TABLE)
->columns(
self::TABLE.'.restriction_id',
self::TABLE.'.project_id',
self::TABLE.'.role_id',
self::TABLE.'.rule',
'restriction_id',
'project_id',
'role_id',
'rule',
'pr.role'
)
->eq(self::TABLE.'.project_id', $project_id)