connection in WhereNode does not come down from Query
|Reported by:||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)
comment:4 Changed 8 years ago by
|Keywords:||qsrf-cleanup WhereNode removed|
|Patch needs improvement:||set|
|Triage Stage:||Unreviewed → Accepted|