Closed sahamilton closed 4 years ago
v2.x-dev Rebuild fails with message Illuminate/Database/QueryException with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'persons.parent_id' in 'where clause' (SQL: select count(*) as aggregate frompersonsleft outer joinpersonsAS parent onpersons.parent_id= parent.idwhere (persons.lftIS NULL OR persons.rgtIS NULL OR persons.lft>=persons.rgtOR (persons.parent_idIS NOT NULL AND (persons.lft<= parent.lftOR persons.rgt>= parent.rgt))) andpersons.deleted_atis null)'
Illuminate/Database/QueryException with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'persons.parent_id' in 'where clause' (SQL: select count(*) as aggregate from
left outer join
AS parent on
.
= parent.
where (
IS NULL OR
>=
OR (
IS NOT NULL AND (
<= parent.
OR
>= parent.
))) and
is null)'
where the model (in this casePerson) has an alias for the parent column: protected $parentColumn = 'reports_to';
protected $parentColumn = 'reports_to';
OK My bad ... Looks like the parent column name has changed to parentColumnName vs parentColumn in prior version...
v2.x-dev Rebuild fails with message
Illuminate/Database/QueryException with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'persons.parent_id' in 'where clause' (SQL: select count(*) as aggregate from
personsleft outer join
personsAS parent on
persons.
parent_id= parent.
idwhere (
persons.
lftIS NULL OR
persons.
rgtIS NULL OR
persons.
lft>=
persons.
rgtOR (
persons.
parent_idIS NOT NULL AND (
persons.
lft<= parent.
lftOR
persons.
rgt>= parent.
rgt))) and
persons.
deleted_atis null)'
where the model (in this casePerson) has an alias for the parent column:
protected $parentColumn = 'reports_to';