[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 adding

[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-31 Thread Sydo Luciani
I got it working with adding additional foreign_keys. one inside backref for one direction, and one outside of backref for the other direction. so we need foreign_keys in both directions if using bidirectional relationship. Now I am able to insert into parent table, but getting sql error inserting

[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-30 Thread Sydo Luciani
Correction on wordings: One parent table, two child tables, one foreign key from each child pointing to the same field in parent with "one to one relationship" works with no problem, but getting "AmbiguousForeignKeysError" as soon as adding the second foreign key to child tables pointing to the se