On Apr 6, 2008, at 11:27 AM, ZhangShen Peng(Uestc graduating...) wrote:
> I tried both remove and clear > but seems have no effect > > I think maybe two reason: > > 1.elixir cached the query when I used Iike feed.posts ( OneToMany) mmm I dont think elixir is caching anything additional. However, if you have a collection on an object, that is just a plain collection, like a list - once its loaded, its loaded, unless you say session.expire(object, ['collectionname']). An alternative is to use a "Dynamic" relation, which will issue the SQL to the database on each access (but still will return objects cached in the Session if already found): http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relation_largecollections_dynamic > 2.mako cached the query result , because I did the feed.posts query > in template only if you are using Mako cache options explicitly - nothing caches by default. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---