[horde] Problem in Rdo/RelationshipTest testing clotho example in MySQL

Chuck Hagenbuch chuck at horde.org
Tue Aug 25 04:22:02 UTC 2009


Quoting Elier Delgado <elier.delgado at gmail.com>:

> I have been testing Rdo, specifically the clotho example available on
> the CVS with MySql,
> and seem happen an error building the SQL sentence when I tested the
> relationship.
>
> Have someone tested this in MySql before?
>
> The ItemMapper find method return this query, that not work in MySQL:
>
> SELECT clotho_wbs_items.item_id, clotho_wbs_items.item_name,
> clotho_wbs_items.item_parent, clotho_wbs_items.item_duration,
> clotho_wbs_items.item_start, clotho_wbs_items.item_start_fixed,
> clotho_wbs_items.item_finish, clotho_wbs_items.item_finish_fixed,
> clotho_resources.resource_id AS `clotho_resources at resource_id`,
> clotho_resources.resource_type AS `clotho_resources at resource_type`,
> clotho_resources.resource_name AS `clotho_resources at resource_name`,
> clotho_resources.resource_uid AS `clotho_resources at resource_uid`,
> clotho_resources.resource_base_calendar AS
> `clotho_resources at resource_base_calendar`,
> clotho_resources.resource_start AS `clotho_resources at resource_start`,
> clotho_resources.resource_finish AS
> `clotho_resources at resource_finish`,
> clotho_wbs_items.item_id AS `clotho_wbs_items at item_id`,
> clotho_wbs_items.item_name AS `clotho_wbs_items at item_name`,
> clotho_wbs_items.item_parent AS `clotho_wbs_items at item_parent`,
> clotho_wbs_items.item_duration AS `clotho_wbs_items at item_duration`,
> clotho_wbs_items.item_start AS `clotho_wbs_items at item_start`,
> clotho_wbs_items.item_start_fixed AS
> `clotho_wbs_items at item_start_fixed`, clotho_wbs_items.item_finish AS
> `clotho_wbs_items at item_finish`, clotho_wbs_items.item_finish_fixed AS
> `clotho_wbs_items at item_finish_fixed`
> FROM clotho_wbs_items INNER JOIN clotho_wbs_items ON
> clotho_wbs_items.item_parent = clotho_wbs_items.item_id
> WHERE clotho_wbs_items.`item_id` = 1 LIMIT 0, 1
>
> It's a join with the self table without use alias, to can work must be
> like this:

Hi! I know it's nearly a year later, but this email has been in my  
inbox, waiting for me to find a time to check it after the git Rdo  
rewrite. Tonight I sat down and went from the beginning, so this bug  
was up. I reproduced it and have fixed this specific issue. I've also  
fixed a few other things in Rdo that weren't working right, and  
updated the clotho example to work with the PHP 5 Horde_Db and  
Horde_Rdo libs. There's one more bug in there somewhere when running  
RelationshipTest.php; hopefully it's the last one, and I'll try to  
work on it more tomorrow.

Hope this is useful to someone - it's definitely gotten me familiar  
again with the Rdo pieces that need work.

Best,
-chuck


More information about the horde mailing list