[sqlalchemy] SqlAlchemy 0.7.4 Make a hybrid_property a declared_attr

2011-12-11 Thread Hector Blanco
Hello everyone! I'm trying to migrate from SqlAlchemy 0.6.8 to 0.7.4. I have a class that is the base for all the bases in my system. In that class is where I define the id (numeric primary key) for the rest of my classes. That class is not mapped to any table. I want to have getter/setter for

Re: [sqlalchemy] SqlAlchemy 0.7.4 Make a hybrid_property a declared_attr

2011-12-11 Thread Michael Bayer
On Dec 11, 2011, at 5:56 AM, Hector Blanco wrote: but if then i try to use the id in filters (such as Product.manufacturer.any(id=parameterId), where Product is a really mapped class, with a relationship towards Manufacturer, another really mapped class, ) I get a key error id, so it looks

Re: [sqlalchemy] SqlAlchemy 0.7.4 Make a hybrid_property a declared_attr

2011-12-11 Thread Hector Blanco
The workaround is very simple, just say A.id==5 instead of id=5. The bug itself is fixed in r99564ce1414c. Ah, yeah! That works! I find using the double == for comparison clearer (just a personal opinion) -- You received this message because you are subscribed to the Google Groups