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
For example:
You have a UserService where you call withDepth() function and before that line of code is reached, your model user model gobal scope join is added to query. Then there is an error that coulmn xy is not found in table users.
UserModel: $query->join('user_relation_clients', function ($join) use ($currentClientId) { $join->on('users.id', '=', 'user_relation_clients.user_id') ->where('user_relation_clients.client_id', $currentClientId); });
For example:
You have a UserService where you call withDepth() function and before that line of code is reached, your model user model gobal scope join is added to query. Then there is an error that coulmn xy is not found in table users.
UserModel:
$query->join('user_relation_clients', function ($join) use ($currentClientId) { $join->on('users.id', '=', 'user_relation_clients.user_id') ->where('user_relation_clients.client_id', $currentClientId); });
UserService:
$user->withDepth()->having('depth', '=', $this->request->get('depth'));
Error:
select *, (select count(1) - 1 from
usersas
_dinner join
user_relation_clientson
users.
id=
user_relation_clients.
user_idand
user_relation_clients.
auth_client_id= 2ea431c9-5218-4a96-89d2-587e441725ba where
users.
_lftbetween
_d.
_lftand
_d.
_rgt) as
depthfrom
usersinner join
user_relation_clientson
users.
id=
user_relation_clients.
user_idand
user_relation_clients.
auth_client_id= 2ea431c9-5218-4a96-89d2-587e441725ba where
is_published= 1 and
users.
_lftbetween 38 and 54 having
depth= 1 order by
order_noasc
@lazychaser is there any workaround ?
The text was updated successfully, but these errors were encountered: