Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#31502 closed Cleanup/optimization (fixed)

Document Model._state.db and Model._state.adding.

Reported by: Adam Johnson Owned by: Tim Park
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Gordon Wrigley Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Several points in the documentation cover using Model._state, but it doesn't have any official documentation. As far as I can tell, there are enough use cases documented that we should consider it a public API.

I think it would be good to have some coverage of what is included in _state, at least the db and adding attributes.

Change History (11)

comment:1 by Mariusz Felisiak, 5 years ago

Component: Database layer (models, ORM)Documentation
Summary: Document Model._stateDocument Model._state.db and Model._state.adding.
Triage Stage: UnreviewedAccepted

I think we should document db and adding attributes of Model._state instead of Model._state itself.

I closed #24691 as a duplicate because it mentions only Model._state.adding, and we can handle both in a single ticket.

comment:2 by Tim Park, 4 years ago

Owner: changed from nobody to Tim Park
Status: newassigned

comment:3 by Mariusz Felisiak, 4 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:4 by Carlton Gibson <carlton@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 697e59d5:

Fixed #31502 -- Documented Model._state.db and Model._state.adding

comment:5 by Carlton Gibson <carlton.gibson@…>, 4 years ago

In dad6973:

[3.1.x] Fixed #31502 -- Documented Model._state.db and Model._state.adding

Backport of 697e59d5cf81e6c7e4a06ca98d6e3e16cea486dc from master

comment:6 by Carlton Gibson <carlton.gibson@…>, 4 years ago

In b66588a:

[3.0.x] Fixed #31502 -- Documented Model._state.db and Model._state.adding

Backport of 697e59d5cf81e6c7e4a06ca98d6e3e16cea486dc from master

comment:7 by Gordon Wrigley, 4 years ago

Should the documentation also state that it's safe to use despite the traditional meaning of the "_" prefix?

comment:8 by Adam Johnson, 4 years ago

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 5ef6f62:

Refs #31502 -- Made minor edits to Model._state docs.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In e63644d3:

[3.1.x] Refs #31502 -- Made minor edits to Model._state docs.

Backport of 5ef6f626347f9ea13915f3cf5b8b045c5b42b102 from master

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 051e6f5:

[3.0.x] Refs #31502 -- Made minor edits to Model._state docs.

Backport of 5ef6f626347f9ea13915f3cf5b8b045c5b42b102 from master

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