Re: [sqlalchemy] Re: problems with filter_by()
On Monday, January 14, 2008 10:59:17 AM UTC-5, Michael Bayer wrote: On Jan 14, 2008, at 10:45 AM, maxi wrote: Thaks for your help. Can you post an example over how to use filter and filter_by in new sqlalchemy versions? http://docs.sqlalchemy.org/en/rel_0_8/orm/query.html#sqlalchemy.orm.query.Query.filter_by Docs are good but for the very lazy :) filter_by(name = 'Dan') or filter(User.name == 'Dan') -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.
[sqlalchemy] Re: problems with filter_by()
On Jan 14, 2008, at 9:38 AM, maxi wrote: Hi, I recently upgrade from sqlalchemy 0.3.10 to 0.4.2p3. I have a method like this: def getPlanillaDet(self, plan_id): return session .query(PlanillaDet).filter_by(Planilladet.c.plan_id==plan_id).all() Now, after update, when I try to execute this method, I get an exception with the next message: File V:\nacer\bin\common\services.py, line 192, in get return session .query(PlanillaDet).filter_by(Planilladet.c.plan_id==plan_id).all() TypeError: filter_by() takes exactly 1 argument (2 given) What is the problem here ? use filter() for clause-based expressions, filter_by() only takes **kwargs now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: problems with filter_by()
Thaks for your help. Can you post an example over how to use filter and filter_by in new sqlalchemy versions? Is your recommendation included in 0.3 to 0.4 migration guide? Why this change? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---