I faced an issue while trying to use SQL function in where clause of CfWheels's findAll() method.
<cfset currencyInfo= model('pricelist').findAll(select="currencyid,name",where="YEAR(startDate)=#params.year#")>
The confusing thing here is that while using the sql function in the select clause of the same statement, it works like a charm.
<cfset currencyInfoTest= model('pricelist').findAll(select="currencyid,name,YEAR(startDate) AS Year",where="id=5")>
I guess CFWheels might be processing the column mappings in the select clause only and not any calculated or operated syntax in the where clause.
I need to use some sql functions in the where clause as above. Any ideas?