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 breaking the
transaction(is this possible)?

I am not trolling just asking?

Regards,
Ilian Iliev

-- 
eng. Ilian Iliev
Web Software Developer

Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org

On Wed, Sep 14, 2011 at 2:34 PM, Tom Evans <tevans...@googlemail.com> wrote:

> On Wed, Sep 14, 2011 at 8:12 AM, Ilian Iliev <il...@i-n-i.org> 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 clear the cache.
> >
>
> Clear 'the cache' - as the side effect of performing a zero row update
> on your model!
>
> I wouldn't do that. The issue the user is hitting is that he is still
> within his original transaction - there is no caching going on. Read
> the documentation on managing transactions:
>
> https://docs.djangoproject.com/en/1.3/topics/db/transactions/
>
> In particular, how to completely disable transaction management, which
> you would probably want to do on the desktop app, and manage them
> manually if you need transactions.
>
>
> https://docs.djangoproject.com/en/1.3/topics/db/transactions/#how-to-globally-deactivate-transaction-management
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to