Not much difference except space in your model.py file... With the
seconde case you can override constrain in the controller when needed.

Richard

On Wed, Mar 2, 2011 at 12:09 PM, goutham <[email protected]> wrote:
> whats the diff between
>
> ####### case 1 #########
> db.define_table('branch',
>    Field('name','string', unique = True, notnull = True),
>    Field('content','list:string'))
>
>
> ###### case 2 #######
> db.define_table('branch',
>    Field('name','string'),
>    Field('content','list:string'))
>
> db.branch.name.unique = True
> db.branch.name.notnull = True
> #############
>
> in case 2 the database is not added with the unique and notnull
> constraints .. why is this happening whats the diff..

Reply via email to