From 2dea8f257f63613f425b39eb4fca7e789cf59225 Mon Sep 17 00:00:00 2001 From: Ibrahim BinAlshikh Date: Tue, 30 Apr 2024 12:26:41 +0300 Subject: [PATCH] fix: Fix to Table Name Inclusion on Create Table Query --- webfiori/database/mssql/MSSQLColumn.php | 1 + webfiori/database/mssql/MSSQLTable.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/webfiori/database/mssql/MSSQLColumn.php b/webfiori/database/mssql/MSSQLColumn.php index e88278a..3bc4f28 100644 --- a/webfiori/database/mssql/MSSQLColumn.php +++ b/webfiori/database/mssql/MSSQLColumn.php @@ -632,6 +632,7 @@ private function defaultPartString() { } } private function firstColPartString() { + $this->setWithTablePrefix(false); $retVal = MSSQLQuery::squareBr($this->getName()).' '; $colDataTypeSq = MSSQLQuery::squareBr($this->getDatatype()); $colDataType = $this->getDatatype(); diff --git a/webfiori/database/mssql/MSSQLTable.php b/webfiori/database/mssql/MSSQLTable.php index d2f9efd..c8b472f 100644 --- a/webfiori/database/mssql/MSSQLTable.php +++ b/webfiori/database/mssql/MSSQLTable.php @@ -299,11 +299,13 @@ private function createFKString() { $sourceCols = []; foreach ($fkObj->getSourceCols() as $colObj) { + $colObj->setWithTablePrefix(false); $sourceCols[] = ''.$colObj->getName().''; } $targetCols = []; foreach ($fkObj->getOwnerCols() as $colObj) { + $colObj->setWithTablePrefix(false); $targetCols[] = ''.$colObj->getName().''; } $fkConstraint .= " constraint ".$fkObj->getKeyName().' '