On 23/01/2013 07:47, Alexey Vihorev wrote:
Ok, I've set up a complete test case: http://pastebin.com/W08w6Hg6
That throws an exception:
TypeError: getattr(): attribute name must be string
File "h:\devProjectsT\aaTests\aaMisc\AlexeyVihorev\sahybrid-org.py",
line 67, in <module>
res = s.query(Payable).filter(Payable.value==order).all() #this does not
File
"c:\Python27\Lib\site-packages\sqlalchemy-0.7.9-py2.7.egg\sqlalchemy\ext\hybrid.py",
line 681, in __get__
return self.expr(owner)
File "h:\devProjectsT\aaTests\aaMisc\AlexeyVihorev\sahybrid-org.py",
line 46, in value
return getattr(self, self.type)
as you can see I am on 0.7.9.
I am not an expert on these things but shouldn't you maybe use the
following instead of hybrid_property:
http://docs.sqlalchemy.org/en/latest/orm/inheritance.html
Werner
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.