On Thu, Mar 10, 2011 at 12:55 PM, Richard Vézina <
[email protected]> wrote:

> Ok,
>
> a) I don't think DAL has SQL view... If someone can correct me on this
> affirmation...
>
> b) Label is a way to give different name to a field... It is not useful for
> what you expect. You want to use the value of record instead of it id as a
> representation of this record into a dropbox (requires) or a select
> (represent). For this there is "format=" or "requires=" that share the same
> purpose in a slightly different manner. You can read about those in the
> book.
>
> c) I Think that your table company is not necessary if there is always only
> one person for one company, but if you have many person in the same company
> you will get a person table nomalised level 1 if you don't have a company
> table.
>
> The solution a post is not kind of web2py SQL View... It's not a SQL view
> in the sens that records are duplicated. I don't know how to implement a SQL
> View into web2py and there is surely an other better solution, but it works
> as you expect (as far as I can understand your model).
>
> Corrections :

The solution I post is a kind of web2py SQL View... It's not a SQL view in
the sens that records are duplicated. I don't know how to implement a SQL
View into web2py and there is surely an other better solution, but it works
as you expect (as far as I can understand your model).



>
> Richard
>
>
> On Thu, Mar 10, 2011 at 12:28 PM, Norbert Klamann <
> [email protected]> wrote:
>
>> Hello Richard,
>> many thanks for your work. When I think about it : The table
>> 'person_company' could be a view, couldn't it ?
>> But i have not understood :
>>
>> a) how to define a view in DAL ?
>>
>> b) How to use it as the 'label' Parameter for the IS_IN_DB Validator.
>>
>> If this would be possible the redundant table 'person_company' could be
>> omitted.
>>
>> Thanks again for listening (and answering  of course)
>>
>> Norbert
>>
>
>

Reply via email to