On Mon, 2008-04-14 at 23:56 -0700, Simon Litchfield wrote:
> Anyone who mixes the ORM with raw data-modifying SQL concurrently may
> well be in for a surprise.
> 
> Scenario. Load your model; run your data-modifying SQL; then
> explicitly try to reload your model to refresh it's data. Gotcha. The
> inbuilt queryset cache will cleverly skip straight over your attempt
> to reload.

Depends upon how you try to reload your data. But

        MyModel.objects.get(pk=my_instance.pk)
        
is never going to hit any caches and is the logical way to do this.
Adding a second way to do something isn't good design.

Ticket #901 has always had the problem that it talks about model
reloading when I suspect it really wants to be about queryset reloading;
quite a different thing.

Malcolm

-- 
The hardness of butter is directly proportional to the softness of the
bread. 
http://www.pointy-stick.com/blog/


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

Reply via email to