connection in WhereNode does not come down from Query
|Reported by:||Koen Biermans <koen.biermans@…>||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
The connection used in WhereNodes is not the one in Query, but an import from django.db.
I am attaching a patch that adds the connection via the initialisation of the wherenode. The catch is I had to fix the deepcopying: the connection should be copied as a reference.
I do not know whether this will break the ability to pickle the query, an extra getstate/setstate may be required here.
Change History (6)
Changed 7 years ago by Koen Biermans <koen.biermans@…>
comment:1 Changed 7 years ago by gav
- Keywords qsrf-cleanup added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 6 years ago by Koen Biermans <koen.biermans@…>
- Resolution invalid deleted
- Status changed from closed to reopened
comment:4 Changed 6 years ago by mtredinnick
- Keywords qsrf-cleanup WhereNode removed
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted