vendredi 12 février 2016

Check for uniqueness in web2py database using 2 fields

I have a database with two fields, 'user' of type reference auth_user and 'projectId' of type reference project. I have an SQLFORM which takes the auth_user input from the view and also takes the projectId from the request arguments. The problem is that a user can be entered to the database multiple times per project. How can I make it so that a user can be entered in the database multiple times but only once per project? Thanks!

Aucun commentaire:

Enregistrer un commentaire