multiple column unique index

16 views
Skip to first unread message

pedro

unread,
Feb 5, 2009, 6:00:11 PM2/5/09
to web2py Web Framework
Do validators support this?
I am inserting many to many relationships manually, can I use
validators to make sure no two rows are identical?

mdipierro

unread,
Feb 5, 2009, 6:14:28 PM2/5/09
to web2py Web Framework
is

db.table.field2.requires=IS_NOT_IN_DB(db
(db.table.field1==request.vars.field1),db.table.field2)

mdipierro

unread,
Feb 5, 2009, 6:20:13 PM2/5/09
to web2py Web Framework
Yes

db.table.field2.requires=IS_NOT_IN_DB(db
(db.table.field1==request.vars.field1),db.table.field2)

On Feb 5, 5:00 pm, pedro <pedro...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages