You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In users migration table:
$table->foreignId('manager_id')->nullable()->constrained('users');
In User model:
public function manager(): BelongsTo
{
return $this->belongsTo(User::class, 'manager_id')->select('id', 'fullname');
}
Purity sorting string : 'group.name:asc' -> no effect
All other sorting types on relation are working.
I tried with another Model (Customer that belongs to a group where group is a Customer), and this is the same problem.
The text was updated successfully, but these errors were encountered:
olivierbaudouin
changed the title
Sorting has no effect when a relation has the same class than the model
Sorting has no effect when a relation has same class than the model
Jan 10, 2025
Steps to reproduce:
In users migration table:
$table->foreignId('manager_id')->nullable()->constrained('users');
In User model:
public function manager(): BelongsTo
{
return $this->belongsTo(User::class, 'manager_id')->select('id', 'fullname');
}
Purity sorting string : 'group.name:asc' -> no effect
All other sorting types on relation are working.
I tried with another Model (Customer that belongs to a group where group is a Customer), and this is the same problem.
The text was updated successfully, but these errors were encountered: