[Zope] Inconsistent aquisition behavior between Zope versions

Paulo Eduardo Neves neves@email.com
Tue, 07 Sep 1999 20:44:42 -0300


Hi,
I had to spent some time out of this list and now I'm trying to upgrade
to Zope2 and to catch on with all the news. Everything seems to work
fine with my upgrade, but I'm with a problem with a site pattern I use a
lot. 

I'll first describe the site design pattern I use with an example.

I have a SQL method to get a list of cities, if an state_id variable is
defined I just get the cities of that state. Here is the "getCities" SQL
method:
SELECT * FROM city
<!--#if state_id-->
WHERE state_id=<!--#var state_id-->
<!--#/if-->

It doens't have any arguments. 

I have a subfolder "state18" that is almost empty, it just defines an
int property: state_id=18

When I test the sql method everything works fine. In the base folder the
query returns all cities, if I add "state18" to the query url, the query
just returns the cities of state number 18.

The problem happens when I use the query inside a DTML document. If I
have a DTML method "showCities" that list just list the cities and is
inserted inside a document "cities". I get:

In Zope 1.10.3:
http://mysite.com/basefolder/cities => returns all cities
http://mysite.com/basefolder/state18/cities => returns cities of state
18

In Zope 2

http://mysite.com/basefolder/cities => returns all cities
http://mysite.com/basefolder/state18/cities => STILL returns all cities

If I change the cities document to a method everything work as expected. 

If anyone want to test it, I can send simple example folders for Zope
1.10 and Zope 2. 

Any help? 

-- 
Paulo Eduardo Neves
maito:neves@email.com
Rio de Janeiro - Brasil