> In DAL it can be done like one single command:
> db.define_table('my_items',
>          Field('name', 'string', length=100),
>          Field('description', 'string', length=400),
>          Field('priority', 'integer'),
>          Field('creator_id', 'reference user'),
>          Field('dept_id', 'reference department'),
>         )
>

I know how to create a table object in web2py. This is not my point. I want 
to transparently synchronize the database table and corresponding models 
when doing add/update/delete operations in the model. For instance, the 
update() method in the persistence manager code above only does a 
session.commit() because SQLAlchemy saves all changes done to obj in a 
buffer; saving only requires executing the equivalent queries in the 
relational database and that's what session.commit() does. I do not want to 
have to do the sync manually.

-- 
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/d/optout.

Reply via email to