I have two samples here, one works, the other does not. They are pretty similar:
Example#1 DOES NOT WORK: db.define_table("project", SQLField("project_number", "text", notnull=True, default=None), SQLField("project_name", "text", notnull=True, default=None), SQLField("project_description", "text", notnull=True, default=None), SQLField("project_status", "integer", notnull=True, default=None), SQLField("contact", "integer", notnull=True, default=None) SQLField("id_project_location",db.project_location)) """ Table definition """ db.define_table("project_location", SQLField("address_1", "text", notnull=True, default=None), SQLField("address_2", "text", notnull=True, default=None), SQLField("address_3", "text", notnull=True, default=None), SQLField("municipality", "integer", notnull=True, default=None), SQLField("country", "text", notnull=True, default=None), SQLField("zip_code", "text", notnull=True, default=None), SQLField("id_project", db.project)) Example#2 DOES WORK: db.define_table("project", SQLField("project_number", "text", notnull=True, default=None), SQLField("project_name", "text", notnull=True, default=None), SQLField("project_description", "text", notnull=True, default=None), SQLField("project_status", "integer", notnull=True, default=None), SQLField("contact", "integer", notnull=True, default=None)) """ Table definition """ db.define_table("project_location", SQLField("address_1", "text", notnull=True, default=None), SQLField("address_2", "text", notnull=True, default=None), SQLField("address_3", "text", notnull=True, default=None), SQLField("municipality", "integer", notnull=True, default=None), SQLField("country", "text", notnull=True, default=None), SQLField("zip_code", "text", notnull=True, default=None), SQLField("id_project", db.project)) If I do follow example#2, I would be creating a One-Many relationship, more locations per project which I do not want. Thanks dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---