Michael Bayer a écrit : > On Apr 30, 2007, at 9:42 AM, remi jolin wrote: > > >> Hello, >> >> I'm using selectresults and activemapper. >> in version 0.3.1 if I did something like x = >> Announces.select(Annonces.c.type=="A") I got a SelectResults object. >> Now (0.3.6) I get a list of Announces (the query is done immediately). >> But if I don't specify anything in the select method >> (Announces.select()) I get the expected SelectResults object. >> >> Is it the expected behavior ? >> >> > > its not. I can see a small bug in SelectResultsExt that might lead > to this issue, so try out 2588 for that. > Ok, it works. Thanks Michael. > however, SelectResults is deprecated since all of its functionality > is available within Query. if you instead call Announces.query.filter > (Annonces.c.type=="A") that would be the new usage. > isn't it Announces.query().filter(Annonces.c.type=="A")
because your syntax gives an error "AttributeError: 'function' object has no attribute 'filter'" TurboGears paginate is using SelectResults, not (V 1.0.1) Query. > not to mention that ActiveMapper is deprecated in favor of Elixir > too :) . > Yes I know but my project is older than Elixir ;-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
