[Erp5-dev] sql_catalog_related_keys
Sebastien Robin
seb at nexedi.com
Thu Jun 2 09:36:37 CEST 2005
Hi,
I have found something strange in the implementation of
sql_catalog_related_keys.
There is for example this:
resource_type | movement,catalog/portal_type/z_related_resource
This is great, this will do a join on the table movement. This works well.
Now, I want to do the same thing with another table, for example I want to
do a join with the table stock with the z_related_resource zsql method.
For example:
stock_resource_title | stock,catalog/title/z_related_resource
And you know what ? Then the join will still happen on the movement
table ! Indeed, the ZSQLCatalog assumes that there is only one way to use
z_related_resource. So it will always use the same tables for table_0 and
table_1, whatever we can put on our second sql_catalog_related_keys.
Is it safe to modify the implementation ?
Seb.
--
Sebastien Robin, Nexedi Technical Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
More information about the Erp5-dev
mailing list