Skip to content

Commit 0d0bf4e

Browse files
committed
Inheritance - FK save: Fix postgres test
1 parent a481578 commit 0d0bf4e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/TDBMAbstractServiceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,10 @@ private static function initSchema(Connection $connection): void
476476
// - `inheritance_agency` have an FK to `inheritance_society.**id_entity**`
477477
// - `inheritance_society` have an FK to `inheritance_entity.**id**`
478478
$db->table('inheritance_entity')
479-
->column('id')->integer()->primaryKey()->autoIncrement();
479+
->column('id')->integer()->primaryKey()->autoIncrement()
480+
->column('name')->string();
480481
$db->table('inheritance_society')
481-
->column('id_entity')->references('inheritance_entity')->primaryKey()
482-
->then();
482+
->column('id_entity')->references('inheritance_entity')->primaryKey();
483483
$db->table('inheritance_agency')
484484
->column('id')->integer()->primaryKey()->autoIncrement()
485485
->column('id_parent_society')->references('inheritance_society');

tests/TDBMDaoGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2217,7 +2217,7 @@ public function testInheritanceFkWithDifferentPkName(): void
22172217
{
22182218
$inheritanceSocietyDao = new InheritanceSocietyDao($this->tdbmService);
22192219
$inheritanceAgencyDao = new InheritanceAgencyDao($this->tdbmService);
2220-
$society = new InheritanceSocietyBean();
2220+
$society = new InheritanceSocietyBean('test');
22212221
$inheritanceSocietyDao->save($society);
22222222
$this->assertNotNull($society->getId());
22232223
$agency = new InheritanceAgencyBean($society);

0 commit comments

Comments
 (0)