Ok, thanks Massimo. I know that unique=True will never work because there's
no way to tell the database about multi-tenancy, I just wanted to make sure
the validators were working properly.
The ticket you refer to is about a problem with unique=True. You
cannot use unique=True with multi-tenant app because the latter is
enforced at the DB level and the DB has no knowledge of multi-tenancy.
I do not believe there is any other problem related with IS_IN_DB and
IS_NOT_IN_DB but perhaps
Did this ever get resolved? I tried looking for a ticket on this but only
found one related to setting unique=True. I have to convert my app to
support multiple tenants and IS_IN_DB() and IS_NOT_IN_DB() are going to be
used in several places to make sure that a tenant cannot have duplicate rows
Please open a ticket and I will fix it.
On Jun 23, 5:19 am, rif wrote:
> I used this feature like this:
>
> db._common_fields.append(Field('request_tenant',default=auth.user_id,writab
> le=False,readable=False))
>
> so every user would have it's own data.
>
> It seeams that IS_IN_DB is not aware
I used this feature like this:
db._common_fields.append(Field('request_tenant',default=auth.user_id,writable=False,readable=False))
so every user would have it's own data.
It seeams that IS_IN_DB is not aware of the request_tenant and also if you
mark a filed as unique it will be unique across
5 matches
Mail list logo