This could work something like the way that ForeignKey `on_delete` works
- you have options that are enumerated as constants, but in reality they
are classes that embody the strategy to be used. We could have something
similar - `on_missing_relation=FETCH | WARN | ERROR | IGNORE ... `
Luke
On 18/08/17 14:01, Shai Berger wrote:
On Friday 18 August 2017 09:08:11 Anssi Kääriäinen wrote:
Maybe we should just add the queryset method. This is the smallest atomic
task that can be done. Even if there's only the queryset method available,
it's possible to enable prefetches per model by using a Manager.
I disagree on both counts: I don't think it's the smallest atomic task, and
I'm not so sure it's the right thing to do.
The smallest atomic task, the way I see it, is building the infrastructure
that would allow adding the queryset method -- but would also allow different
APIs to be set around it.
And since there is as yet no consensus on the correct API for "end" users, I
would rather not define one immediately.
Shai.
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/ba0ddd74-5240-757f-e6ea-3300f2ba3a61%40cantab.net.
For more options, visit https://groups.google.com/d/optout.