May help others:
instead of col in const.columns
I needed col in list(const.columns)
to avoid: sqlalchemy.exc.ArgumentError: __contains__ requires a string
argument with the ColumnCollection object
On 4/30/2010 4:16 PM, Michael Bayer wrote:
Kent wrote:
I did read 0.6 Migration
On May 1, 2010, at 2:04 PM, Kent Bower wrote:
May help others:
instead of col in const.columns
I needed col in list(const.columns)
to avoid: sqlalchemy.exc.ArgumentError: __contains__ requires a string
argument with the ColumnCollection object
dont hate me but const.columns should
Wait a second... ForeignKeyConstraint doesn't but PrimaryKeyConstraint
does?
(Not trying to be sassy, just wondering why I got the error in the first
place)
On 5/1/2010 2:11 PM, Michael Bayer wrote:
On May 1, 2010, at 2:04 PM, Kent Bower wrote:
May help others:
instead of col in
Oh, I get it, you are saying ColumnCollection has contains_column()
method.
On 5/1/2010 4:05 PM, Kent Bower wrote:
Wait a second... ForeignKeyConstraint doesn't but
PrimaryKeyConstraint does?
(Not trying to be sassy, just wondering why I got the error in the
first place)
On 5/1/2010
Yeah, this is a bit awkward.
My code used to be able to say:
=
constraint_list = list(tab.constraints)
for cnsts in constraint_list:
if cnsts.contains_column(col):
=
And I can't replace that
contains_column() going away from ForeignKeyConstraint might have been in error
(i.e. I dont recall intending to remove it). But at the same time the whole
realm of contains a column is squirrely to me, since theres first two
dimensions of, are you asking 'colname in collection' or 'column in
I did read 0.6 Migration document.
I was using the contains_column method of ForeignKeyConstraint.
Apparently removed?
AttributeError: 'ForeignKeyConstraint' object has no attribute
'contains_column'
Easy workaround or replacement call?
--
You received this message because you are subscribed
Kent wrote:
I did read 0.6 Migration document.
I was using the contains_column method of ForeignKeyConstraint.
Apparently removed?
AttributeError: 'ForeignKeyConstraint' object has no attribute
'contains_column'
Easy workaround or replacement call?
it has a columns collection where you