Hi, I'm using version "^1.12". I have a simple model with softdeletes, a (Ulid) parent_id and a (Ulid) id
when running $model->descendants()->get() I get a SQLSTATE[42S22] error
"with recursive laravel_cte as ((select , 0 as depth, cast(id as char(65535)) as path from filecabinets__filecabinets where parent_id is null) union all (select filecabinets__filecabinets., depth + 1 as depth, concat(path, ., filecabinets__filecabinets.id) from filecabinets__filecabinets inner join laravel_cte on laravel_cte.id = filecabinets__filecabinets.parent_id)) select * from laravel_cte where filecabinets__filecabinets.deleted_at is null"
filecabinets__filecabinets table has deleted_at field
model is just
class Test extends Model
{
use CRUDUseUlidKeyTrait;
use HasRecursiveRelationships;
use SoftDeletes;
public function getTable()
{
return 'filecabinets__filecabinets';
}
}
when I comment the SoftDeletes trait I get the correct result
Hi, I'm using version "^1.12". I have a simple model with softdeletes, a (Ulid) parent_id and a (Ulid) id
when running $model->descendants()->get() I get a SQLSTATE[42S22] error
"with recursive
laravel_cte
as ((select , 0 asdepth
, cast(id
as char(65535)) aspath
fromfilecabinets__filecabinets
whereparent_id
is null) union all (selectfilecabinets__filecabinets
.,depth
+ 1 asdepth
, concat(path
, .,filecabinets__filecabinets
.id
) fromfilecabinets__filecabinets
inner joinlaravel_cte
onlaravel_cte
.id
=filecabinets__filecabinets
.parent_id
)) select * fromlaravel_cte
wherefilecabinets__filecabinets
.deleted_at
is null"filecabinets__filecabinets table has deleted_at field
model is just
when I comment the SoftDeletes trait I get the correct result
thank you