From fc9b536eeedc6b080426f14f6db6170014333f2e Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Tue, 28 Jun 2022 12:37:02 +0000 Subject: [PATCH] - Quick MSSQL fix --- src/Adapter/MsSQL.php | 3 +++ src/Repository.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Adapter/MsSQL.php b/src/Adapter/MsSQL.php index 879606e..5a065f8 100644 --- a/src/Adapter/MsSQL.php +++ b/src/Adapter/MsSQL.php @@ -100,6 +100,9 @@ class MsSQL implements AdapterInterface { if ( $this->encrypt ?? false ) { $parts[] = "Encrypt=1"; } + else { + $parts[] = "Encrypt=0"; + } if ( $this->failoverPartner ?? false ) { $parts[] = "Failover_Partner={$this->failoverPartner}"; diff --git a/src/Repository.php b/src/Repository.php index 795ce36..bd73acb 100644 --- a/src/Repository.php +++ b/src/Repository.php @@ -287,6 +287,7 @@ class Repository public function generateDatasetDiff(object $entity, bool $oldValues = false) : array { $array = array_change_key_case($entity->toArray()); + $dataset = array_change_key_case($entity->entityGetDataset(false, true)); return array_diff_assoc($oldValues ? $dataset : $array , $oldValues ? $array : $dataset ); @@ -611,7 +612,7 @@ class Repository }); } else { - throw new \Exception("You referenced field `$item` which do not exist or do not contain a valid @Join annotation."); + throw new \Exception("Referenced field `$item` which do not exist or do not contain a valid @Join annotation."); } }