[sqlalchemy] Re: need 0.6_beta2-compat declarative meta

2010-03-27 Thread avdd
In a metaclass's __init__, the attributes have already been placed on the class, so mutating the attributes dict has no effect. Try setting the id attribute directly: self.id = PrimaryKey(...) On Mar 27, 6:04 pm, Daniel Robbins drobb...@funtoo.org wrote: Hi All, In 0.6_beta2, the following

Re: [sqlalchemy] Re: need 0.6_beta2-compat declarative meta

2010-03-27 Thread Chris Withers
avdd wrote: In a metaclass's __init__, the attributes have already been placed on the class, so mutating the attributes dict has no effect. Spot on. SA fudged this prior to 0.6beta so you could get away with shoving stuff in dict_, you now can't... def PrimaryKey(seqprefix): return

Re: [sqlalchemy] Re: need 0.6_beta2-compat declarative meta

2010-03-27 Thread Daniel Robbins
On Mar 27, 2010, at 5:58 AM, Chris Withers wrote: avdd wrote: In a metaclass's __init__, the attributes have already been placed on the class, so mutating the attributes dict has no effect. Spot on. SA fudged this prior to 0.6beta so you could get away with shoving stuff in dict_, you now