﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20093	Allow Model Cache Invalidation	s.shanabrook@…	nobody	"I propose allowing a model instance to have its fields refetched from the database. For instance, it could work something like this.

{{{
>>> model = MyModel.objects.create()
>>> model.field
None
>>> model.field = 'New Value'
>>> model.field
'New Value'
>>> model.invalidate()
>>> model.field
None
}}}

This is useful when testing a model. For instance, if I want to test a function that modifies a model, I currently have to re get the model from the database, before testing its fields, to make sure they have been saved.
{{{
model = MyModel.objects.create()
model_modifier(model)
assert model.field == 'New Value'
model_non_caches = MyModel.objects.get(pk=model.pk)
assert model.field == 'New Value'
}}}"	New feature	closed	Database layer (models, ORM)	dev	Normal	worksforme			Unreviewed	0	0	0	0	0	0
