Hi, I have encountered the following issue:
I have wx.ObjectListView that displays 3000 Job(Entity) objects. If I do: myObjectListView.SetObjects(Job.query.all()) someJobObject.hide = True #hide is a column in the DB session.commit() myObjectListView.SetSortColumn(column=2,resortNow=True) # this should quickly sort my ObjectListView now the funny thing is that the sort takes a few seconds (a VERY long time). this is because each all elixir Entitys has lost thier confidens and query the DB about themself , one at a time... if i do: #same code as before+ session.commit() Job.query.all() #yes again... myObjectListView.SetSortColumn(column=2,resortNow=True) # this should quickly sort my ObjectListView its a bit faster (about 1 second), since it does 1 select "..." from jobtable instead of issuing thousands of querys. 1 second is still a pain and this is UGLY code, any comment will be welcomed. Thanks, Yoav. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
