Open cleverid opened 8 months ago
After authorization, the user with his tenant_id makes a request to the database.
tenant_id
How to make it so as not to add this tenant_id manually to the where section?
From ORM query:
const users = await orm .select() .from(userSchema) .where(eq(userSchema.tenant_id, this.tenant_id)); // Users for tenant_id. Filter added as handly
To:
const users = await orm .select() .from(userSchema) // But the request has tenant_id as a result of the SQL query
After authorization, the user with his
tenant_id
makes a request to the database.How to make it so as not to add this
tenant_id
manually to the where section?From ORM query:
To: