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

this allows the ORM to properly escape the rule column, as needed on MSSQL
This commit is contained in:
Joe Nahmias 2022-08-23 21:14:06 -04:00 committed by Frédéric Guillot
parent 70bc427470
commit cf739273d5
1 changed files with 15 additions and 15 deletions

View File

@ -46,11 +46,11 @@ class ColumnRestrictionModel extends Base
return $this->db return $this->db
->table(self::TABLE) ->table(self::TABLE)
->columns( ->columns(
self::TABLE.'.restriction_id', 'restriction_id',
self::TABLE.'.project_id', 'project_id',
self::TABLE.'.role_id', 'role_id',
self::TABLE.'.column_id', 'column_id',
self::TABLE.'.rule', 'rule',
'pr.role', 'pr.role',
'c.title as column_title' 'c.title as column_title'
) )
@ -73,11 +73,11 @@ class ColumnRestrictionModel extends Base
$restrictions = $this->db $restrictions = $this->db
->table(self::TABLE) ->table(self::TABLE)
->columns( ->columns(
self::TABLE.'.restriction_id', 'restriction_id',
self::TABLE.'.project_id', 'project_id',
self::TABLE.'.role_id', 'role_id',
self::TABLE.'.column_id', 'column_id',
self::TABLE.'.rule', 'rule',
'pr.role', 'pr.role',
'c.title as column_title' 'c.title as column_title'
) )
@ -105,11 +105,11 @@ class ColumnRestrictionModel extends Base
return $this->db return $this->db
->table(self::TABLE) ->table(self::TABLE)
->columns( ->columns(
self::TABLE.'.restriction_id', 'restriction_id',
self::TABLE.'.project_id', 'project_id',
self::TABLE.'.role_id', 'role_id',
self::TABLE.'.column_id', 'column_id',
self::TABLE.'.rule', 'rule',
'pr.role' 'pr.role'
) )
->eq(self::TABLE.'.project_id', $project_id) ->eq(self::TABLE.'.project_id', $project_id)