Skip to content

Commit

Permalink
composite key entity remove fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Apr 25, 2017
1 parent 21a3528 commit c01d3f7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Jobs/Entity/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ class Remove extends Job

public function run()
{
$pk = [];
$space = $this->getSpace();
$entity = $this->getSpace()->getRepository()
->findOne(get_object_vars($this->id));

foreach($space->getPrimaryIndex()->parts as $part) {
$pk[] = $this->id->{$space->getFormat()[$part[0]]['name']};
}

$entity = $space->getRepository()->findOne($pk);
$this->getMapper()->remove($entity);
}
}
}

0 comments on commit c01d3f7

Please sign in to comment.