This is because AFTER creating the cookbook, the scaffolding app uses 
check_reserved=['all'] in the DAL call.
It prevents users to use table and field names that are reserved keywords 
in all databases, so i.e. if you move from sqlite to mysql your app won't 
raise an error.

On Friday, November 1, 2013 2:56:53 AM UTC+1, Rupesh Pradhan wrote:
>
> It is so strange that when the following table
>
> db.define_table('log',
>     Field('body', 'text',notnull=True),
>     Field('posted_on', 'datetime'),
>     Field('contact', 'reference contact'))
>
> is imported as a part of an app (simple_contacts), it does not raise an 
> error. This app is available as an example download for the book 'web2py 
> Application Development Cookbook'
>
> Whereas, when I create a similar table in an app (contacts) to learn how 
> to program in web2py, I get the following error.
> <type 'exceptions.SyntaxError'> invalid table/column name "log" is a "ALL" 
> reserved SQL/NOSQL keyword
>
>
> What I did was to change the table name from 'log' to 'log1' and continued 
> my learning task. However, I am still curious why this problem happened.Can 
> someone check it out and explain.
>
> I have attached the packages for you to try out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to