The syntax above is very straightforward and useful and those not look
very ambiguous. dot notation can be introduced for what DenesL
suggested...

i,e, if we have

db.define_table('person : Name, Birthday date, Telephone')
db.define_table('dog: Name, Owner person.Name, Picture upload')

Here without ".Name" it would default to id, else, it would have the
extra directive of %(name)



On Apr 13, 8:13 pm, DenesL <[email protected]> wrote:
> Maybe too short to be useful, but when you get to references it would
> be nice to have:
>
> db.define_table('friendship: person.name, dog.name')
>
> But then, does this mean:
>
> db.define_table('friendship'
>   ,SQLField('person_name'
>     ,db.person
>     ,requires=IS_IN_DB(db,db.person,'%(name)')
>   )...
>
> or
>
>   ,SQLField('person_name'
>      ,db.person.name.type
>      ,db.person.name.length
>      ,requires=IS_IN_DB(db,db.person.name)
>   )...
>
> On Apr 13, 2:16 am, mdipierro <[email protected]> wrote:
>
> > In trunk you can now do
>
> > db.define_table('person : Name, Birthday date, Telephone')
> > db.define_table('dog: Name, Owner person, Picture upload')
>
> > Is this useful? Look at the source. Is the syntax reasonable?
>
> > Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to