[ZPatterns] Multiple entries for a single object in the ZCatalog? (not)

Jean Jordaan jean@upfrontsystems.co.za
Thu, 21 Mar 2002 17:41:03 +0200


Hi List

For the archives ..

Short version:

When using proxy objects (*) in ZPatterns, it is possible to find
yourself with seemingly multiple entries for the same object in the
ZCatalog.

(*) created like so:
  INITIALIZE OBJECT WITH
    original_object = Contacts.Customers.newItem(self.id)

Long version:

I noticed something funny in my Catalog: multiple entries for a single
object. Out of 287 entries for objects of meta_type 'Customer', 13 are
entries for the same object. For example, from the output of the script
that interrogates the Catalog for me::

    'Customer 1052 (732623916) doesnt have customerID'
    'Customer 1052 (-150661289) has customerID 1052'

When I visit the entries, at::

    .../Catalog/manage_objectInformation?rid=732623916
    .../Catalog/manage_objectInformation?rid=-150661289

their meta_data is as follows::

    meta_type: Customer 
    id: 1052 
    bobobase_modification_time: 2002/03/18 13:41:39.3712 GMT+2

    meta_type: Customer
    id: 1052 
    bobobase_modification_time: 2002/01/28 15:10:13.2156 GMT+2

The correct one is 732623916, last modified 2002/03/18. Most of the
indexes are the same, but there are a number of differences. 

This mystified me, until I looked at the indexed paths:

    'Customer 1052 (732623916) is at /Contacts/Customers/1052'
    'Customer 1052 (-150661289)is at /Licenses/1052'

The second is a proxy object created by SkinScript. I'm mailing this
in case someone else finds themselves the same quandary one day. 

-- 
Jean Jordaan
Upfront Systems                         http://www.upfrontsystems.co.za