You must have use the same field name for referenced field in both table and didn't handle this properly while using .factory(), since you lost table_name for disambiguation you get this trace back...
Richard On Fri, Nov 4, 2016 at 11:53 AM, Anthony <abasta...@gmail.com> wrote: > On Thursday, November 3, 2016 at 11:19:21 PM UTC-4, Alex Glaros wrote: >> >> I think this error arises when two tables in factory have same field >> name. I usually get around this by naming one of the fields differently, >> but best practice is to name same foreign key identically in all tables it >> is used in. >> > > Not quite clear what you mean. When using SQLFORM.factory, you are not > creating a database table -- it is just for creating a form. Once you get > the data from the form submission, you are responsible for inserting into > the database, so at that time, just change the field name as needed. > > Anthony > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.