[Django] #33737: DB queries with using() not consistent/correct

7 views
Skip to first unread message

Django

unread,
May 23, 2022, 1:29:41 PM5/23/22
to django-...@googlegroups.com
#33737: DB queries with using() not consistent/correct
-------------------------------------+-------------------------------------
Reporter: Stephen | Owner: nobody
Brown |
Type: Bug | Status: new
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords: using
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I've got a case where I carefully operate on a database with the ORM
creating objects (using "objects.using", and in transactions with "using="
consistently set for the decorator arg) - and then querying them in the
same session. When I connect with "using" set to non default - the query
operations on the created objects do not return any results. It works fine
when "using" is set to 'default'. The other database, to confirm it wasn't
a database configuration issue, I set it so that the config for "default"
pointed to that database, and again it worked fine.

I also removed transactions, to simplify any complexity, and it was still
an issue.

I tested this is also an issue with 4.0.4, though I was using 3.2.13
initially.

--
Ticket URL: <https://code.djangoproject.com/ticket/33737>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 23, 2022, 1:32:05 PM5/23/22
to django-...@googlegroups.com
#33737: DB queries with using() not consistent/correct
-------------------------------------+-------------------------------------
Reporter: Stephen Brown | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: using | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Stephen Brown):

I should mention the databases against which I was making operations were
postgres 13.x

--
Ticket URL: <https://code.djangoproject.com/ticket/33737#comment:1>

Django

unread,
May 23, 2022, 2:20:33 PM5/23/22
to django-...@googlegroups.com
#33737: DB queries with using() not consistent/correct
-------------------------------------+-------------------------------------
Reporter: Stephen Brown | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: needsinfo

Keywords: using | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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


Comment:

Thanks for the report. Can you provide a minimal project to reproduce?
(I'm not sure which methods you're reporting as affected and in what
scenario.) Can you reproduce the issue with Django 4.1a1?

--
Ticket URL: <https://code.djangoproject.com/ticket/33737#comment:2>

Reply all
Reply to author
Forward
0 new messages