My application uses a per-user session to allow multiple sessions from the same user to share state. It works very much like a django session by etching objects.
I need to decompose a complex object that references django model objects. A standard etching process stores a denormalized object in brine. Therefore, if an object changes in the database between etching and unpacking, the model is now out of date. (I know that this is also true for objects with memory, but etching is a convenient time to solve it.)
Obviously, it would be cleaner to store this complex in a database, but this is not practical. The code for it necessarily changes rapidly as the project develops. The need to update the database schema every time when changes to the object's data model slow down the project.
So I would like not to sort the complete django model object. Instead, just save your class and id and reload the contents from the database at boot time. Can I specify my own brine method for this class? I am happy to write a wrapper class around the django model to handle lazy selection from db if there is a way to do etching.
source share