#15130: Model.validate_unique method doesn't take in account multi-db
-------------------------------------+-------------------------------------
     Reporter:  t2y                  |                    Owner:
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  multi-db             |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by akaariai):

 As an addition - maybe we don't even want the complete solution. Because
 if we add using to model.validate(), we kind of have to add it to
 `ModelForm.is_clean()`, too. And then we have to decide what we do with
 `ModelChoiceField(Author.objects.all())`, shouldn't it use the specified
 database for validation, too?

 But it seems usages where you need to validate the same model against
 multiple databases really aren't that common. So, how much effort should
 we spend on fixing this, instead of for example trying to add composite
 foreign key support?

--
Ticket URL: <https://code.djangoproject.com/ticket/15130#comment:18>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.748294d1682ef776ee0634224badb893%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to