- Not hooked up to the event system, so that they're faster to load.
- Will not have any changed persisted to the database on a
store.commit().
- Are (maybe?) not cached.
The goal is primarily to get some speedup and secondarily some safety,
knowing that an accidentally modified object won't persist on a
commit. As far as an API, I've been thinking about this:
result = store.find(...)
result.config(readonly=True)
And maybe also some control about caching:
result.config(cache=False)
I cooked up some code to monkey patch a ResultSet and override the
default object building behaviour, but it probably isn't directly
usable, since I have a feeling it breaks References and ReferenceSets
(maybe this is okay)? I also haven't profiled this, so I have no idea
if it actually yields much benefit in terms of performance. I do
wonder if this kind of thing could help make it easier to load objects
out of memcache or similar.
It'd be even better to have a better description of what you have in mind :). Bonus point if you have an API idea.