[Zope-Coders] Traversing to a version (was: CMF/CMFStaging- Imported sources)
Florent Guillaume
fg@nuxeo.com
Thu, 16 May 2002 17:54:37 +0000 (UTC)
> > One caution: getVersionOfResource() currently makes a copy in the
> > database every time you call it (so you can't accidentally change the
> > object that's actually stored in the repository).
Yes, I saw that.
> I _did_ have some play code laying around that allowed you
> to get at the version state in a read-only way (by replacing
> the _p_jar of the version state with one that will always
> raise an error if you try to change the object).
Is that what ReadOnlyJar was for ? I see it's currently unused.
> ...with the idea being that if you specifically pass the readonly
> flag then you can get the state much more efficiently, with the
> understanding that there is no way to change the object after
> you get it.
Which is (I think) exactly what I'd want when traversing to old
versions, they'd be readonly anyway.
Anyway, an inefficient version is ok for now for prototyping.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com