[Zope] WebDAV Metadata
Dieter Maurer
dieter@handshake.de
Fri, 4 Jul 2003 22:00:10 +0200
HolgerSchmidt wrote at 2003-7-3 15:07 +0200:
> Wednesday, 2003-07-11 21:10 Dieter Maurer wrote:
> ...
> DM> > I think it should be possible to "redirect" this Metadata, so a
> DM> > PROPPATCH would save the Metadata to 'MY' MySQL-DB and a PROPFIND
> DM> > would get it from 'MY' MySQL-DB ...
> DM> >
> DM> > Has anybody ever done something like this before?
>
> DM> I did something like this but for general attributes
> DM> (not WebDAV properties).
>
> DM> A word of warning:
>
> DM> You get lots of nasty problems when you distribute attribute
> DM> storage between ZODB and something external.
>
> DM> Moving and copying must be treated carefully.
> DM> Export/Import is likely to break.
> DM> Undo and Versions will bring your system in an inconsistent state.
>
> DM> Apart from that, it is not too difficult:
>
> DM> Attribute access can be handled by letting "__getattr__"
> DM> fetch the attributes from the database on demand.
>
> hmm ... this works as far as I do not change any attributes via WebDAV
> or the "Zope Management Interface" ...
> If I change these attributes every later WebDAV-Request returns the
> values i changed the attributes to even if i return some other value in
> my __getattr__-Method:
> ...
> DM> For modification, the "PropertyManager" methods can
> DM> be overridden to update the values in the database
> DM> (be careful, if you delay update until transaction
> DM> commit (for efficiency). It may be too late then to
> DM> register the DA.).
You should read my complete answer ;-)
Apparently, you stopped reading after the "attribute access" section
and ignored the "modification" section.
Please try again. The "modification" section is quoted above...
Dieter