Hi,
If have this TQL:
select
menu.id as menuId,menu.active as menuActive,
menu.name as
menuName,menu.menuKey,menu.menuOrder,menu.parentMenu as
parentMenu,
domain.id as domainId,domain.url as domainUrl,
domain.name as
domainName,domain.description as domainDescription from menu join domain
where
domain.id = :domainId and menuId <> :currentMenuId
I get an error
The 2 parameter of the Left function, which is now -1, must be a positive integer
The error occurred in D:\workspace\CMS\Framework\CMS\Transfer\com\tql\walkers\Property.cfc: line 44
In this file Transfer is parsing the TQL and separating the properties from classes - e.g. "
menu.id" is separated in class "menu" and property "id"
If I change the Tql to this:
select
menu.id as menuId,menu.active as menuActive,
menu.name as
menuName,menu.menuKey,menu.menuOrder,menu.parentMenu as
parentMenu,
domain.id as domainId,domain.url as domainUrl,
domain.name as
domainName,domain.description as domainDescription from menu join domain
where
domain.id = :domainId and
menu.id <> :currentMenuId
the query gets executed correctly.
The only difference is here:
where
domain.id = :domainId and menuId <> :currentMenuId
changed to
where
domain.id = :domainId and
menu.id <> :currentMenuId
This means that I cannot use the aliased columnname "menuId" after the "and" operator although I could use it _before_ the "and" operator (domainId instead of
domain.id)
Maybe this is intentional but I figured I just mention this in case anybody runs into the same issue.
Marc