Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#9919 closed (fixed)

Raw SQL documentation doesn't mention transaction management

Reported by: Leo Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Attempting to do modifying raw SQL with a cursor requires the transaction to be explicitly committed. The documentation at: http://docs.djangoproject.com/en/dev/topics/db/sql/ doesn't mention anything about this.

I've attached a patch that documents this detail and cleaned up some of the style of that page to make it more legible.

Attachments (1)

raw-sql-docs-r9690.patch (4.2 KB) - added by Leo 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Leo

comment:1 Changed 6 years ago by shai

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

It's not the docs that are wrong; it's the code. See #9964.

comment:2 Changed 6 years ago by jacob

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #9964.

comment:3 Changed 6 years ago by russellm

  • milestone set to 1.1
  • Patch needs improvement set
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Triage Stage changed from Unreviewed to Accepted

In the absence of a resolution for #9964, we should add a note on the need to manually dirty transactions if you use raw-sql.

The current patch doesn't do that, though.

comment:4 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11024]) [1.0.X] Fixed #9919 -- Added note on the need to mark transactions as dirty when using raw SQL.

Merge of r11022 from trunk.

comment:5 Changed 6 years ago by russellm

(In [11022]) Fixed #9919 -- Added note on the need to mark transactions as dirty when using raw SQL.

comment:6 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top