Skip to content

Commit

Permalink
Merge pull request #42 from mzglinski/master
Browse files Browse the repository at this point in the history
Fix issue #41
  • Loading branch information
mootensai authored Jul 23, 2017
2 parents 84e328e + 92f110c commit 414dbd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ public function saveAll($skippedRelations = [])
if (!empty($this->relatedRecords)) {
/* @var $records ActiveRecord | ActiveRecord[] */
foreach ($this->relatedRecords as $name => $records) {
if(in_array($name, $skippedRelations))
continue;

$AQ = $this->getRelation($name);
$link = $AQ->link;
if (!empty($records) && !in_array($name, $skippedRelations)) {
if (!empty($records)) {
$notDeletedPK = [];
$notDeletedFK = [];
$relPKAttr = ($AQ->multiple) ? $records[0]->primaryKey() : $records->primaryKey();
Expand Down

0 comments on commit 414dbd5

Please sign in to comment.