Skip to content

Commit ff5dcb6

Browse files
committed
...
1 parent 8527d67 commit ff5dcb6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/ORM/Functional/Driver/Common/Integration/Case428/CaseTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ private function makeTables(): void
103103

104104
$this->makeFK('order_item', 'order_id', 'order', 'id', 'NO ACTION', 'CASCADE');
105105

106+
$this->makeFK('order_item', 'purchase_order_id', 'purchase_order', 'id', 'NO ACTION', 'CASCADE');
107+
106108
$this->makeFK('purchase_order_item', 'purchase_order_id', 'purchase_order', 'id', 'NO ACTION', 'CASCADE');
107109

108110
$this->makeFK('purchase_order_item', 'order_item_id', 'order_item', 'id', 'NO ACTION', 'CASCADE');

tests/ORM/Functional/Driver/Common/Integration/Case428/schema.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
return [
1616
'order' => [
1717
Schema::ENTITY => Order::class,
18+
Schema::MAPPER => Mapper::class,
1819
Schema::SOURCE => Source::class,
1920
Schema::DATABASE => 'default',
2021
Schema::TABLE => 'order',
@@ -63,6 +64,17 @@
6364
'status' => 'status',
6465
],
6566
Schema::RELATIONS => [
67+
'order' => [
68+
Relation::TYPE => Relation::BELONGS_TO,
69+
Relation::TARGET => 'order',
70+
Relation::LOAD => Relation::LOAD_PROMISE,
71+
Relation::SCHEMA => [
72+
Relation::CASCADE => true,
73+
Relation::NULLABLE => false,
74+
Relation::INNER_KEY => 'order_id',
75+
Relation::OUTER_KEY => ['id'],
76+
],
77+
],
6678
'purchaseOrder' => [
6779
Relation::TYPE => Relation::BELONGS_TO,
6880
Relation::TARGET => 'purchase_order',

0 commit comments

Comments
 (0)