Skip to content

Commit

Permalink
fix Fqn args order to match the default
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Mar 20, 2024
1 parent 2f0c3c0 commit 527369d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Dbal/Conventions/Conventions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/inc/model/author/AuthorsMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 527369d

Please sign in to comment.