Skip to content

Commit f6e3282

Browse files
Add table name to where clause
1 parent 934bdbb commit f6e3282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Inheritance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected static function bootInheritance()
4747
}
4848

4949
static::addGlobalScope(function ($query) {
50-
$query->where(static::$inheritanceColumn, static::getInheritanceType());
50+
$query->where($query->getModel()->getTable().'.'.static::$inheritanceColumn, static::getInheritanceType());
5151
});
5252

5353
static::creating(function ($model) {

0 commit comments

Comments
 (0)