From 527369d3d71cdb378c5e827eb762fa98a32ffb07 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Tue, 19 Mar 2024 13:38:45 +0100 Subject: [PATCH] fix Fqn args order to match the default --- composer.json | 2 +- src/Mapper/Dbal/Conventions/Conventions.php | 2 +- tests/inc/model/author/AuthorsMapper.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 248abb3a..9b6a8f46 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "ext-ctype": "*", "nette/caching": "~3.2 || ~3.1.3", "nette/utils": "~3.0 || ~4.0", - "nextras/dbal": "~5.0.0-rc2" + "nextras/dbal": "~5.0.0@dev" }, "require-dev": { "nette/bootstrap": "~3.1", diff --git a/src/Mapper/Dbal/Conventions/Conventions.php b/src/Mapper/Dbal/Conventions/Conventions.php index efcb08bd..e2311995 100644 --- a/src/Mapper/Dbal/Conventions/Conventions.php +++ b/src/Mapper/Dbal/Conventions/Conventions.php @@ -263,7 +263,7 @@ public function getManyHasManyStorageName(IConventions $targetConventions): stri if ($this->storageNameWithSchema) { $schema = $this->storageTable->fqnName->schema; - return new Fqn(name: $table, schema: $schema); + return new Fqn(schema: $schema, name: $table); } else { return $table; } diff --git a/tests/inc/model/author/AuthorsMapper.php b/tests/inc/model/author/AuthorsMapper.php index 9168877f..8585690e 100644 --- a/tests/inc/model/author/AuthorsMapper.php +++ b/tests/inc/model/author/AuthorsMapper.php @@ -16,7 +16,7 @@ final class AuthorsMapper extends DbalMapper public function getTableName(): string|Fqn { if ($this->connection->getPlatform()->getName() === PostgreSqlPlatform::NAME) { - return new Fqn(name: 'authors', schema: 'public'); + return new Fqn(schema: 'public', name: 'authors'); } else { return 'authors'; }