Skip to content

Commit

Permalink
Merge pull request #51 from gitkv/fix-join-Bug
Browse files Browse the repository at this point in the history
fixed bug "Column reference is ambiguous" for queries with join
  • Loading branch information
calebporzio authored Jul 17, 2019
2 parents 627087f + c309254 commit abc977a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasParent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function bootHasParent()
$instance = new static;

if ($instance->parentHasHasChildrenTrait()) {
$query->where($instance->getInheritanceColumn(), $instance->classToAlias(get_class($instance)));
$query->where($instance->getTable().'.'.$instance->getInheritanceColumn(), $instance->classToAlias(get_class($instance)));
}
});
}
Expand Down

0 comments on commit abc977a

Please sign in to comment.