Skip to content

Commit c9b1910

Browse files
committed
Inheritance - FK save: Fix postgres test
1 parent fdf23d0 commit c9b1910

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
@@ -470,10 +470,10 @@ private static function initSchema(Connection $connection): void
470470
// - `inheritance_agency` have an FK to `inheritance_society.**id_entity**`
471471
// - `inheritance_society` have an FK to `inheritance_entity.**id**`
472472
$db->table('inheritance_entity')
473-
->column('id')->integer()->primaryKey()->autoIncrement();
473+
->column('id')->integer()->primaryKey()->autoIncrement()
474+
->column('name')->string();
474475
$db->table('inheritance_society')
475-
->column('id_entity')->references('inheritance_entity')->primaryKey()
476-
->then();
476+
->column('id_entity')->references('inheritance_entity')->primaryKey();
477477
$db->table('inheritance_agency')
478478
->column('id')->integer()->primaryKey()->autoIncrement()
479479
->column('id_parent_society')->references('inheritance_society');

tests/TDBMDaoGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2178,7 +2178,7 @@ public function testInheritanceFkWithDifferentPkName(): void
21782178
{
21792179
$inheritanceSocietyDao = new InheritanceSocietyDao($this->tdbmService);
21802180
$inheritanceAgencyDao = new InheritanceAgencyDao($this->tdbmService);
2181-
$society = new InheritanceSocietyBean();
2181+
$society = new InheritanceSocietyBean('test');
21822182
$inheritanceSocietyDao->save($society);
21832183
$this->assertNotNull($society->getId());
21842184
$agency = new InheritanceAgencyBean($society);

0 commit comments

Comments
 (0)