[Zope] Relational queries on zope obj db?
Mon, 28 May 2001 22:50:30 -0400
> From: "Jeff Kowalczyk" <email@example.com>
> A simple example would be: customer-class in one folder,
> purchaseorder-class in another, productitem-class in a third; select all
> purchase orders for customerA, displaying each individual productitem
Why would you have those three things in different folders? Why not, for
price = 0
itemno = 0
upc = 0
description = ''
ponumber = 0
itemlist = 
shipping = 0
terms = 'net 30'
tax = 0
date = ZopeTime()
total = 0
for i in itemlist
total = total + i.price
total = total * (1 + self.tax) + self.shipping
customerid = 0
terms = 'net30'
address = ''
purchase_orders = 
So then you instantiate a customer object for each customer (customer1 =
Customer()), and each time a purchase order is made you'd instantiate one of
those and add it to the list:
then you could add items to the last purchase order (of course, you'd
probably want to address it by name, easily done in python, but for
Seems the object orientation of python makes something like this the natural
organization, as opposed to the table orientation of a so-called RDB....
Then in Zope, you'd naturally take steps to Catalog these things as they
were created, facilitating high speed searches and report generation.