Re: Caching/Reload problem - cannot refresh model data

2011-09-15 Thread Tom Evans
On Thu, Sep 15, 2011 at 9:56 AM, Ilian Iliev wrote: > "Any UPDATE or INSERT will always commit the current transaction." ??? > > If this is correct(which I doubt) then you do not have transactions at all. > As I know > the idea of transaction is to run multiple statements in a way that they are >

Re: Caching/Reload problem - cannot refresh model data

2011-09-15 Thread Ilian Iliev
"Any UPDATE or INSERT will always commit the current transaction." ??? If this is correct(which I doubt) then you do not have transactions at all. As I know the idea of transaction is to run multiple statements in a way that they are independent form the other statements run at the same time? --

Re: Caching/Reload problem - cannot refresh model data

2011-09-15 Thread Tom Evans
On Wed, Sep 14, 2011 at 6:57 PM, Ilian Iliev wrote: > Hi Tom, > I checked the link you send and probably you are right but > can you explain why this is a bad solution? > Yes using autocommit() or disabling transactions seems more right > are there any downsides of the update() that you are seeing

Re: Caching/Reload problem - cannot refresh model data

2011-09-14 Thread Ilian Iliev
Hi Tom, I checked the link you send and probably you are right but can you explain why this is a bad solution? Yes using autocommit() or disabling transactions seems more right are there any downsides of the update() that you are seeing? Image a case when you want to update the result set without

Re: Caching/Reload problem - cannot refresh model data

2011-09-14 Thread Tom Evans
On Wed, Sep 14, 2011 at 8:12 AM, Ilian Iliev wrote: > How are you pulling the data from the database in the desktop app - using > pure SQL or using the ORM? > > If using the ORM it is possible it to cache the results of the database so > you can run: > > mymodel.objects.update() > > This should cl

Re: Caching/Reload problem - cannot refresh model data

2011-09-14 Thread puppriss
Brilliant - that does the trick! Many thanks Ilian. A very simple solution yet I trawled the documentation and never came across it. Must've been looking in the wrong place. Yes, I'm using the ORM... and occasionally raw SQL for the app. Cheers Phil -- You received this message because you ar

Re: Caching/Reload problem - cannot refresh model data

2011-09-14 Thread Ilian Iliev
How are you pulling the data from the database in the desktop app - using pure SQL or using the ORM? If using the ORM it is possible it to cache the results of the database so you can run: mymodel.objects.update() This should clear the cache. -- eng. Ilian Iliev Web Software Developer Mobile: