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
Currently when we update object/struct if it has autoincrement field, then unable to add 1 more column to where clause in update.
eg: Suppose we have multiple tenants having tenant_name column along with ID as an auto increment column.
When we update object, it uses only autoincrement ID field in where clause. What if we will change ID( of another tenant) and then update. Then it will update all fields of another tenant.
So If we have 1 more column support in where clause, then it will solve multi tenant issue.
eg: update table_name set .. ** where ID=123 AND tenant_name='tenant1'.**
Hope You got the problem.
The text was updated successfully, but these errors were encountered:
pritamlipu1
changed the title
security: Add another column support along with autoincrment column in where clause in update statement
security: Add support for another column along with autoincrment column in where clause in update statement
Sep 13, 2021
Currently when we update object/struct if it has autoincrement field, then unable to add 1 more column to where clause in update.
eg: Suppose we have multiple tenants having tenant_name column along with ID as an auto increment column.
When we update object, it uses only autoincrement ID field in where clause. What if we will change ID( of another tenant) and then update. Then it will update all fields of another tenant.
So If we have 1 more column support in where clause, then it will solve multi tenant issue.
eg: update table_name set .. ** where ID=123 AND tenant_name='tenant1'.**
Hope You got the problem.
table cols: ID, tenant_name, name, description,...
db.AddTableWithName(struct{}, "table_name").SetKeys(true, "id")
The text was updated successfully, but these errors were encountered: