[ZODB-Dev] Re: Ape and retrieval of other zodb items

Rocky Burt rocky.burt at bricsnet.com
Mon May 12 14:15:16 EDT 2003


On Thu, 2003-05-01 at 16:21, Shane Hathaway wrote:
> ZODB loads and stores all attributes of an object at once.  If you want 
> to know which attribute/property is being loaded/stored, the appropriate 
> answer is "any, and maybe all of them."
> 
> I think the limitation here is the schema.  A schema of (id, type, 
> value) allows the serializer to communicate only the properties the 
> instance, not the properties defined by the class.  You either need a 
> new kind of schema that allows the property schema to be included with 
> the property values (Ape's standard schemas don't provide this), or you 
> need to force the serializer to serialize the properties consistently 
> across all instances of a class.  Either way, you'll need to modify a 
> serializer or provide your own.
> 
> I hope this helps.  I like the idea of automatically inventing table 
> names based on class names.

I'm not really understanding what you're suggesting here...

Let me try to explain what I see as what's going on...
Looking at things from a purely object retrieval perspective, it seems
to me that the (de)serializing mechanism gets run too late for it to
have anything to do with the schema of the database.

Correct me if I'm wrong, but here's what I understand that happens
during a object retrieval:
  1) zodb makes a request to the (ape) storage with some form of a
load() call (providing an empty object as the shell to fill)
  2) ape invokes the mapper framework (which in turn invokes the
appropriate gateways) to actually retrieve a slightly formatted set of
the data from the rdbms
  3) ape uses the registered deserializer (registered to the mapper) to
apply the results to an empty object (of the required type/class)

My understanding of the schema's are that they are merely a way for the
serializers to understand the data coming from (going to) some gateways.


- Rocky




More information about the ZODB-Dev mailing list