[web2py] Re: Why SQLTABLE display different things for db. and 'list:reference
'?

Tue, 01 Mar 2011 06:18:01 -0800

what web2py version? they should be the same.

On Mar 1, 1:19 am, surfnet3 <[email protected]> wrote:
> I have the following model:
>
> db.define_table(
>     'person',
>     Field('name'),
>     format=lambda r: r.name,
>     )
>
> db.define_table(
>     'product',
>     Field('name'),
>     Field('buyer', db.person),
>     Field('seller', 'list:reference person'),
>     )
>
> I realize, in the following code:
>
>         SQLTABLE(db().select(db.product.ALL))
>
> Column 'buyer' is referenced by ID while Column 'seller' is referenced
> by name.  Why is that?

Reply via email to