#17459: Subquery fails across multiple databases -------------------------------------+------------------------------------- Reporter: dgouldin | Owner: nobody Type: Bug | Status: reopened Component: Database layer | Version: 1.3 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Design Keywords: | decision needed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by lrekucki):
* cc: lrekucki@… (added) * stage: Unreviewed => Design decision needed Comment: I'm not sure calling {{{db_for_read(Foo)}}} will help here even if we include a hint like {{{subquery_of=Bar}}}. If parent query is already bound to some db, the only thing the router can do for subquery is either return the same DB (thus allowing the subquery to perform) or throw an exception because it's impossible to perform the query (i'm still -1 on doing list() implicitly). How about adding a new method to the router {{{allow_subquery}}} (which would basically work the same as {{{allow_relation}}}, but for models instead of instances) ? -- Ticket URL: <https://code.djangoproject.com/ticket/17459#comment:3> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.