[web2py] Re: The multi-tenant feature and validators ...

2011-06-27 Thread Ross Peoples
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.

[web2py] Re: The multi-tenant feature and validators ...

2011-06-27 Thread Massimo Di Pierro
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

[web2py] Re: The multi-tenant feature and validators ...

2011-06-27 Thread Ross Peoples
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

[web2py] Re: The multi-tenant feature and validators ...

2011-06-23 Thread Massimo Di Pierro
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

[web2py] Re: The multi-tenant feature and validators ...

2011-06-23 Thread rif
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