[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-31 Thread Sydo Luciani
Never mind the OperationalError, I was missing inserting one of the required foreign key fields. The AmbiguousForeignKeysError was caused by missing foreign_keys in both side of direction and is resolved. Thanks On Sun, 31 May 2020 at 13:49, Sydo Luciani wrote: > I got it working with add

[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-31 Thread Sydo Luciani
inserting to child. sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) foreign key mismatch child_one referencing parent. On Sat, 30 May 2020 at 18:13, Sydo Luciani wrote: > > One parent table, two child tables, two foreign keys pointing to a field > in parent with "one to on

[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-30 Thread Sydo Luciani
Any suggestion to fix the problem will be appreciated. Do I need to have 4 relationships or can be done with two relationships ? Thank you On Sat, 30 May 2020 at 18:13, Sydo Luciani wrote: > > One parent table, two child tables, two foreign keys pointing to a field > in parent with "

[sqlalchemy] AmbiguousForeignKeysError

2020-05-30 Thread Sydo Luciani
One parent table, two child tables, two foreign keys pointing to a field in parent with "one to one relationship" works with no problem, but getting "AmbiguousForeignKeysError" as soon as adding the second foreignkey to child table. tried various combinations but none has worked so far.