It's working!!!, thanks! 2011/2/1 Michael Bayer <[email protected]>
> The query itself has to not load the row in the first place. There's a > recipe for that here: > > http://www.sqlalchemy.org/trac/wiki/UsageRecipes/PreFilteredQuery > > > On Feb 1, 2011, at 11:46 AM, slothy Rulez a lot wrote: > > Hi, list! > > I'm trying, to discriminate certain type of rows in the database, in a > table with various attributes, if one attribute, ej: active = > Column(Boolean) is set to False, I don't want it to appear in any kind of > query, but still present in the DB. > > My first attempt is define a reconstructor like this: > > @orm.reconstructor > def init_onload(self): > if not self.active: > Session.expunge(self) > Session.commit() > > But, objects still appear. > > Any idea? > > Thanks, and as always, sorry by my poor English. > > -- > Alex. > Slothy, the Angry Wombat > http://angrywombat.comuv.com/portfolio/ > > > -- > 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. > > > -- > 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]<sqlalchemy%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- Alex. Slothy, the Angry Wombat http://angrywombat.comuv.com/portfolio/ -- 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.
