[Zope] Re: ZCatalog enhancement wishes (and a zcatalog question)

Small Business Services toolkit at magma.ca
Wed Jan 28 10:17:54 EST 2004


How about some form of record-locking features?


I am having a real headache with the following scenario:

Person A retrieves a record from the zcatalog.

Person B retrieves the same record from the zcatalog.

Person A modifies (via an html form) a field from the record, then the
submits the form to a dtml method which has the following update code:

    <dtml-with DNSData>
      <dtml-in "Catalog({'id' : dns_id})">
        <dtml-with "resolve_url(getpath(data_record_id_),REQUEST)">
          <dtml-call
"propertysheets.GritsDNSPS.manage_changeProperties(REQUEST)">
          <dtml-call reindex_object>
        </dtml-with   resolve url>
      </dtml-in   catalog>
    </dtml-with>

What I expect to happen is that the property field on the object in the
DNSData subfolder is updated, then the zcatalog record is updated.

What actually happens is that the zcatalog creates a new entry (a copy of
the original entry) with the new field data (property fields on the object
are metadata fields in the zcatalog).  The original object in the subfolder
is NOT modified (ie. the property field is not changed) and the original
zcatalog entry is still in the zcatalog, also not modified.

I now have one object in the subfolder and two entries in the zcatalog.
Both have the same id (which causes a zope propertysheet error the next time
I try to access the zcatalog record).

I think I am missing something fundamental as to how zcatalog operates.
Anyone have any ideas?

Thanks,

Jonathan







More information about the Zope mailing list