Oh , forget to say , this is a OneToMany query


On Sun, Apr 6, 2008 at 6:40 PM, ZhangShen Peng <[EMAIL PROTECTED]> wrote:
>
>  I use Elixir in pylons
>
>  I try to use .clear() to update all the search result
>
>  but it seems has no effect , when I refresh the web page again and
>  again , sometimes the old search results will still show  .
>
>  my code is as below , is there any mistake ?thanks.
>  _____________________________________________
>  model/__init__.py
>  _____________________________________________
>  import elixir
>  from sqlalchemy import orm
>  Session = orm.scoped_session(
>         orm.sessionmaker(
>             #autoflush=True,
>             #transactional=True
>         )
>     )
>
>  def init_model(engine):
>     elixir.session = Session
>     elixir.metadata.bind=engine
>     elixir.setup_all()
>  _____________________________________________
>  use clear()
>  _____________________________________________
>  from zsite.model import Session
>  def get_feed(url,saver,*args,**kws):
>         ............
>         if updated:
>             Session.clear()
>         Session.remove()
>  >
>



-- 
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 
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to