[web2py] Re: Defining db.py for the first time problem (db references possible?)

2010-06-14 Thread Yarko Tymciurak
On Jun 14, 8:51 am, zsouthboy wrote: > Problem: I don't see how to specify multiple tables with table > references to each other. I can't simply define the relationship, > because the DAL hasn't created a table yet to reference. But I can't > create the table(s) because they reference tables tha

[web2py] Re: Defining db.py for the first time problem (db references possible?)

2010-06-15 Thread zsouthboy
Hi Yarko, Thanks for the help! I had initially tried doing what the introductory docs show (which is marking a reference like ("image", db.image) for a column), which fails because there is no member 'image' of db yet. Then I consulted the technical docs and saw that instead "reference image" shou

[web2py] Re: Defining db.py for the first time problem (db references possible?)

2010-06-15 Thread Yarko Tymciurak
On Jun 15, 1:56 pm, zsouthboy wrote: > Hi Yarko, > > Thanks for the help! > I had initially tried doing what the introductory docs show (which is > marking a reference like ("image", db.image) for a column), which > fails because there is no member 'image' of db yet. > Then I consulted the techni

[web2py] Re: Defining db.py for the first time problem (db references possible?)

2010-06-15 Thread mdipierro
Because I think if you have a table1 that reference a table2 and a table2 that reference table1 something is wrong. I am not even sure all the database backends support that. think about it, you cannot insert a record in table1 without the record in table2 to reference and vice versa. The proper wa

[web2py] Re: Defining db.py for the first time problem (db references possible?)

2010-06-16 Thread zsouthboy
Thanks for your help, mdiperro and Yarko (thanks for the investigation of the code :) ). Circular refererences aren't what I'm attempting at all (obviously that can't work). Instead, those fields would be left nullable and filled in later, for the most part. Example: an already created Person ob