Many queries when activate the defaultGroup

Same result without being default but selecting group field after table is loaded:
->defaultGroup('ownedBy.name')
->defaultGroup('ownedBy.name')
No description
4 Replies
awcodes
awcodes9mo ago
We’re going to need more information than this to help.
H.Bilbao
H.Bilbao9mo ago
Resource code: https://gist.github.com/mendizalea/f6b62bcd48bafee8ae95a43ea2d96afd User Model:
public function ownedBy(): BelongsTo
{
return $this->belongsTo(User::class, 'owned_by');
}
public function ownedBy(): BelongsTo
{
return $this->belongsTo(User::class, 'owned_by');
}
Gist
Many queries when activate the defaultGroup
Many queries when activate the defaultGroup. GitHub Gist: instantly share code, notes, and snippets.
H.Bilbao
H.Bilbao9mo ago
No description
H.Bilbao
H.Bilbao9mo ago
Does it has any sense that there are so many duplicate queries when grouping?