now I use like this class Feed(Entity): has_property('posts',dynamic_loader(Post))
everything is ok ! My english is pool , so I don't know how to express the appreciate for your help . I just want to say THANKS VERY VERY MUCH :) On Mon, Apr 7, 2008 at 12:39 AM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > 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. > > > > > > > -- Blog(Chinese Edition): http://zsp.javaeye.com/ Resume(Also Chinese): http://zsp007.com.cn/ Where graduate soon , where to go ...... Double major: Biomedical Engineering Computer Science -- Hierarch Zhang --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---