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

View File

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