#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 , 5 years ago
Component: | Database layer (models, ORM) → Documentation |
---|---|
Summary: | Document Model._state → Document Model._state.db and Model._state.adding. |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 4 years ago
Should the documentation also state that it's safe to use despite the traditional meaning of the "_" prefix?
Note:
See TracTickets
for help on using tickets.
I think we should document
db
andadding
attributes ofModel._state
instead ofModel._state
itself.I closed #24691 as a duplicate because it mentions only
Model._state.adding
, and we can handle both in a single ticket.