etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 460 forks source link

Column not found: 1054 Unknown column 'table.left' in 'order clause' #327

Open kheengz opened 4 years ago

kheengz commented 4 years ago

laravel: 6.0 buam: 2.0.0-alpha1

i realized that the usaual default column names no longer work

protected $parentColumn = 'parent_id';
protected $leftColumn = 'lft';
protected $rightColumn = 'rgt';
protected $depthColumn = 'depth';
protected $orderColumn = 'name';

seems they have been changed to

protected $parentColumnName = 'parent_id';
protected $leftColumnName = 'lft';
protected $rightColumnName = 'rgt';
protected $depthColumnName = 'depth';
protected $orderColumnName = 'name';
SatoshiDark commented 4 years ago

Hi, I took the workaround to rename the columns lft and rgt to left and right respectively, do you have another workaround?

mariamelebari commented 1 year ago

Thank you, thank you so much, it solves my problem after many days of searching