On Saturday, March 4, 2017 at 6:04:52 AM UTC-5, Jurgis Pralgauskis wrote:
>
> But then vfield doesn't know it belongs to db.mytable?
> And db.mytable doesn't clearly know it holds this field (via fields attr)
>

True, but that is the case whether or not you assign the virtual field 
during or after table definition. If you want the virtual field to know its 
table name, you have to do Field.Virtual(..., table_name='mytable'). As for 
virtual fields not belonging to db.table.fields, that is intentional, as 
they are not regular fields. Instead, you will find the virtual fields in 
db.table._virtual_fields (whether assigned during or after table 
definition).

What is your use case?

Anthony

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to