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
I have to get the last update role assignment of a user, so I have created updated_at timestamp.
When I perform a query such as let users = (await this.model.query().with('roles').fetch()).toJSON()
when I loop on user.roles, I can see the property "pivot" which contains user_id and role_id.
How can I enrich the "pivot" by adding the updated_at timestamp column that I have added?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I have to get the last update role assignment of a user, so I have created
updated_at
timestamp.When I perform a query such as
let users = (await this.model.query().with('roles').fetch()).toJSON()
when I loop on
user.roles
, I can see the property "pivot" which containsuser_id
androle_id
.How can I enrich the "pivot" by adding the updated_at timestamp column that I have added?
Thanks
The text was updated successfully, but these errors were encountered: