Hello there,
I'm wondering if there is an easy way of finding the local column name
given a ForeignKey. For example, the snippet below just gives me the remote
column name:
for fkey in meta.tables['mytable'].foreign_keys:
print fkey.column
I understand I could iterate over all the columns
ForeignKey has .column as the column it refers to, and .parent as the column
that is constrained to that .column.
On Oct 3, 2013, at 3:18 PM, tiadobatima gbara...@gmail.com wrote:
Hello there,
I'm wondering if there is an easy way of finding the local column name given
a ForeignKey. For
Great! Exactly what I was looking for :)
Thank you very much!
g.
On Thursday, 3 October 2013 14:02:58 UTC-7, Michael Bayer wrote:
ForeignKey has .column as the column it refers to, and .parent as the
column that is constrained to that .column.
On Oct 3, 2013, at 3:18 PM, tiadobatima