From 29df52797942b3727a4fd01b65834a0a945320a9 Mon Sep 17 00:00:00 2001 From: Joe Nahmias Date: Sun, 10 Jul 2022 19:55:59 -0400 Subject: [PATCH] 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 --- app/Model/ProjectRoleRestrictionModel.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Model/ProjectRoleRestrictionModel.php b/app/Model/ProjectRoleRestrictionModel.php index 9e5a36fae..522c49263 100644 --- a/app/Model/ProjectRoleRestrictionModel.php +++ b/app/Model/ProjectRoleRestrictionModel.php @@ -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)