So I have the following code and it's not generating tables but
perhaps my thinking isn't quite clear on this.  I can't link two
tables unless one exists previously and that table cannot reference
any other table that is not created unless a reference is used....
explain why this gives me "Tables do not exist" errors no matter which
order I use...

db.define_table('product',
    Field('date_added', 'datetime'),
    Field('date_available', 'datetime'),
    Field('name', length=55),
    Field('quantity', 'integer'),
    Field('price', length=10),
    Field('description', 'reference db.product_description'),
    Field('image', 'reference db.image'),
    Field('review', 'reference db.review'))

db.define_table('image',
    Field('product_id', 'reference db.product'),
    Field('name'),
    Field('file', 'upload'))

db.define_table('product_description',
    Field('prduct_id', 'reference db.product'),
    Field('description', 'text'))

db.define_table('review',
    Field('product_id', 'reference db.product'),
    Field('rating'),
    Field('review', 'text'))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to