Not sure to understand... Why not referring to the to auth_user.id? Why copy
user information and not querring it when you are ready from db.auth_user
???

Richard



On Wed, Jan 5, 2011 at 5:49 AM, pk <peter.kirch...@youngdesigners.de> wrote:

> hi,
> i know that i can check one field with IS_NOT_IN_DB()
> but i need the two fields which deposit not together in one row,
> in my case 'hauptperson' and 'freund'.
>
> here is my table:
>
> #########################################################################
> ## Tabelle Freunde
> #########################################################################
> db.define_table('friends',
>                SQLField('userid',
>                         default=auth.user.id if auth.user else 0,
>                         writable=False, readable=False),
>                SQLField('hauptperson',
>                         default=auth.user.user_name if auth.user else
> 0,
>                         writable=False, readable=False,
> label='Hauptperson'),
>                SQLField('freund', label='Freund', unique=True),
>                SQLField('freundseit', 'datetime',
> default=request.now, label='Freund seit'),
>                SQLField('bestaetigt','boolean', default=False))
>
> db.friends.userid.requires=IS_IN_DB(db,'auth_user.id')
> db.friends.hauptperson.requires=IS_IN_DB(db,'auth_user.user_name')
> db.friends.freund.requires=IS_IN_DB(db,'auth_user.user_name')
>
>
> can somebody help me???
> thanks

Reply via email to