Skip to content

Commit

Permalink
DEBUG assert modelled join table for write operations
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 16, 2022
1 parent d956066 commit 73f2c4d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Persistence/Sql/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public function afterLoad(Model $entity): void

public function beforeInsert(Model $entity, array &$data): void
{
$this->getForeignModel(); // DEBUG assert modelled join table for write operation

if ($this->weak) {
return;
}
Expand Down Expand Up @@ -158,6 +160,8 @@ public function beforeInsert(Model $entity, array &$data): void

public function afterInsert(Model $entity): void
{
$this->getForeignModel(); // DEBUG assert modelled join table for write operation

if ($this->weak) {
return;
}
Expand All @@ -178,6 +182,8 @@ public function afterInsert(Model $entity): void

public function beforeUpdate(Model $entity, array &$data): void
{
$this->getForeignModel(); // DEBUG assert modelled join table for write operation

if ($this->weak) {
return;
}
Expand All @@ -198,6 +204,8 @@ public function beforeUpdate(Model $entity, array &$data): void

public function doDelete(Model $entity): void
{
$this->getForeignModel(); // DEBUG assert modelled join table for write operation

if ($this->weak) {
return;
}
Expand Down

0 comments on commit 73f2c4d

Please sign in to comment.