reactor  

[Reactor for CF] Query renderer making bad DELETE statements

Shannon Jackson
Fri, 01 Dec 2006 13:32:51 -0800

We found the following bug on reactor.query.query in the renderWhere()
method:
 
It is not calling the getFieldOrExpressionForDelete() instead of the
getFieldExpression() when building the where clause for DELETE statements.
The result is that DELETEs look like this:
 
DELETE FROM
[tbl_tableName]
WHERE [tableAlias].[field_id] = <cfqueryparam cfsqltype="cf_sql_integer"
value="#arguments.Query.getValue(1)#" />
 
 
Possible solution:
 
add variables.type into reactor.query.query and set its value in the
getQueryFile() method - then in the renderWhere() method change
buf.append(getFieldExpression(...)) to
buf.append(getFieldOrExpressionForDelete(...)) when variables.type eq
'delete'.
 
 
 
 
See ticket: http://trac.reactorframework.org/reactor/ticket/103 


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
reactor@doughughes.net
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  • [Reactor for CF] Query renderer making bad DELETE statements Shannon Jackson