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

Tue, 01 Mar 2011 09:13:46 -0800

The newest.

On Mar 1, 9:17 am, Massimo Di Pierro <[email protected]>
wrote:
> 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