You may not realise it perhaps, but when defining models for legacy tables, 
you don't need to define every field, just the ones you use. The amount of 
work required in constructing your models may not be as much as you think.
Read about lazy tables: these mean that the table definition is only 
executed when needed. 
For performance reasons it will be better to define models as documented, 
rather than construct them on the fly by querying meta data. That will be 
slow, and you'll lose the lazy table advantage.

 Technically, web2py's models are always "runtime" in that each request 
from a client causes the model to be built as part of constructing the 
response. This means you should be sensitive about what you do as part of 
each request: every page served means the models are rebuilt. Lazy tables 
delays or avoids a lot of this; your 'runtime' approach could be a 
substantial slowdown.

-- 
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