All,
I'm running into a bit of a data type conversion problem with
doLeftOuterJoin() and doInnerJoin(). I'm trying to run a QoQ on a
joined result set using cfqueryparam and Im losing my data type when
using the queryHelper... If I do a QoQ on a standard cfquery, I get
correct results when trying to set a condition on my parentId. (if
that makes sense)
original query:
<cfquery name="userProjects" datasource="myds">
SELECT projects.projectId, projectName, parentId, userId FROM
projects
LEFT OUTER JOIN users2projects ON (projects.projectId =
users2projects.projectId)
</cfquery>
however, If I try and use the queryHelper to do my join, and then do
my QoQ on that result set my condition breaks using cfqueryparam....
one liner join query (much nicer):
<cfset userProjects = instance.QueryHelper.doLeftOuterJoin(projects,
users2projects, 'projectId', 'projectId') />
my QoQ looks like so...
<cfquery name="objNav" dbtype="query">
SELECT * FROM userProjects
WHERE parentid = <cfqueryparam value="#arguments.parentId#"
cfsqltype="cf_sql_integer">
</cfquery>
Im getting a Unsupported Type Comparison Exception when using the
queryHelper... It seems as though doLeftOuterJoin() is changing the
data type of my parentID
or something screwy is happening...
any thoughts?