firedantic icon indicating copy to clipboard operation
firedantic copied to clipboard

Add a `.reload()` to models

Open joakimnordling opened this issue 1 year ago • 1 comments

It would be handy to have a .reload() on the models to re-fetch them from the DB instead of having to manually get the id and then load by id. This would be especially useful when writing unittests if you want to check an API modified a model as expected.

For reference Arangodantic has such functionality.

joakimnordling avatar Mar 04 '24 11:03 joakimnordling

Yep my tests do a lot of such refreshing too, so +1 for the need from here. No idea about the best design but maybe it's just such a reload method indeed.

antont avatar Mar 04 '24 12:03 antont