Okay, I think found a solution. A cfsavecontent in the renderSelect
function of query.cfc seems to be flaking out. I replaced the
cfsaveconent with a bunch of cfsets and that seems to have made the
difference.

Here's the code I changed. It's ugly and half-baked but I want to get
this out in case anyone else is up late working on this problem.

        <cffunction name="renderSelect" access="public" hint="I render a
select query" output="true" returntype="any" _returntype="string">
                <cfargument name="Query" hint="I the query to render. "
required="yes" type="any" _type="reactor.query.render.query" />
                <cfargument name="Convention" hint="I am the Convention object 
to
use when rendering the query." required="yes" type="any"
_type="reactor.data.abstractConvention" />
                <cfset var result = "xxxx" />
                <cfset var where = arguments.Query.getWhere().getWhere() />
                <cfset var order = arguments.Query.getOrder().getOrder() />
                <cfset var whereNode = 0 />
                <cfset var orderNode = 0 />
                <cfset var x = 0 />
                
                <cfset result= "SELECT ">                                       
                        <!--- distinct --->
                        <cfif arguments.Query.getDistinct()>
                                <cfset result = result & "DISTINCT ">
                        </cfif>
                        
                        <!--- collumns --->
                        <cfset result = result & 
"#arguments.Query.getSelectAsString(Convention)#
                        
                        FROM
                                                
                        #arguments.Query.getFromAsString(Convention)#
                        
                        #renderWhere(arguments.Query, arguments.Convention)# ">
                        
                        <cfif ArrayLen(order)>
                                <cfset result = result & "ORDER BY ">
                                
                                <!--- loop over all of the order-bys and render 
them out --->
                                <cfloop from="1" to="#ArrayLen(order)#" 
index="x">
                                        <!--- get the arguments for this 
expression --->
                                        <cfset orderNode = order[x] />
                                        
                                        
<!---#arguments.Convention.formatFieldName(orderNode.field,
orderNode.object)#--->
                                        <cfset result = result & 
"#getFieldExpression(orderNode,
arguments.Convention)# #UCASE(orderNode.direction)# ">
                                        
                                        <cfif x IS NOT ArrayLen(order)>
                                                <cfset result = result & ", ">
                                        </cfif>
                                </cfloop>
                        </cfif>
                
                <cftrace text="resultOfRenderSelect: #result#">
                <cftrace text="getFromAsString:
#arguments.Query.getFromAsString(Convention)#">
                
                <!--- make this valid cfml --->
                <cfset result = Replace(result, "[[", "<", "all") />
                <cfset result = Replace(result, "]]", ">", "all") />
                
                <!--- return the query --->
                <cfreturn result />
        </cffunction>

Hope this helps.

Patrick

--
Patrick McElhaney
704.560.9117


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to