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)
OR
 2.mako cached the query result , because I did the feed.posts query in template

.................
A headache problem .



On Sun, Apr 6, 2008 at 2:30 AM, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
>  On Apr 5, 2008, at 1:13 PM, 张沈鹏(电子科大 毕/就业倒计
>
> 时...) wrote:
>
>  > thanks for you answer :)
>  >
>  > but I still have some problems
>  >
>  > It's to say I should clear session manual once I update the database ?
>  >
>  > can I set timeout  somewhere to auto do this job ?
>  >
>
>  for a web application, you usually use a Session for the lifespan of a
>  request - at the end of the request, you close it out.
>
>  Pylons tutorial has an illustration of this pattern over at 
> http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons
>   . About halfway through, the example illustartes modifying the base
>  controller to say:
>
>  def __call__(self, environ, start_response):
>      try:
>          return WSGIController.__call__(self, environ, start_response)
>      finally:
>          meta.Session.remove()
>
>  SQLAlchemy 0.4.6 (likely version) will include an "auto-expire-on-
>  commit()" feature which will make this step unnecessary, if you use a
>  fully transactional Session.
>
>
>
>
>
>  >
>



-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to