Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database

2016-08-18 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:  invalid
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 The behavior change in #26706 invalidates this ticket.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f79ee8e5bafc20d4a79d680557e8ea5f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database

2016-06-07 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by yoongkang):

 Discussion opened here: https://groups.google.com/forum/#!topic/django-
 developers/ejOpJ_r7tv8

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.11dc757a7c20c9fe3c9357cb2c45c6b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database

2015-09-08 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by TankOs):

 Okay thanks, I'll post to the mailing list then. Thank you! :-)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.5427b6868d3dc9d0985614e9ce07188b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database

2015-09-08 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by timgraham):

 I'm not sure about disabling manager methods if the objects are
 prefetched. That could be awfully backwards incompatible for questionable
 gain in my opinion. As no one else offered any opinions in a week after
 the ticket was opened, I suggested to write to the mailing list to reach a
 wider audience. Proposals for backwards incompatible changes are always
 best raised there too.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.c0eae251b40d634527e20ff6bd9a667a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database

2015-09-08 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by TankOs):

 I agree that it's very difficult (if not impossible) to implement correct
 behavior for all prefetch scenarios. What do you think of disallowing
 adding entities to prefetched fields? Because if adding an entity does not
 reflect that entity in the collection, then it's what causes the most
 confusion, because naturally, when you add things to a container, you
 expect to find it there.

 Personally, I consider prefetched fields as being immutable, so adding
 items to them is not what I'd expect anyway. I'm thinking of an exception
 if the user tries to add entities to a prefetched collection.

 > Feel free to raise the issue on the DevelopersMailingList if you feel
 I'm wrong.

 Can this ticket still be used for discussions?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.cf02adf2b7a08c31079f01a8543fc4f1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25344: Document that prefetch_related() cache doesn't change unless it's refetched from the database (was: prefetch_related() and add() on related field)

2015-09-08 Thread Django
#25344: Document that prefetch_related() cache doesn't change unless it's 
refetched
from the database
--+
 Reporter:  TankOs|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  prefetch_related  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * component:  Database layer (models, ORM) => Documentation
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 I don't think it's a good idea to change the behavior, so I'll accept as a
 documentation patch. Especially for custom `Prefetch`'s it's probably
 impossible to implement correct behavior "in-memory" (e.g. if `Prefetch`
 has a custom queryset, we'd have to determine if the new object matches
 it). Feel free to raise the issue on the DevelopersMailingList if you feel
 I'm wrong.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.be618c2642469f88e337c864d60c20de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.