I recently needed to search for objects which had attached images. I extended getContentObjects to work with arrays and isNull… eg
getContentObjects(typename=“wbMyType”,aImages_isNull = false")
I’ll create a pull request but first I though I’d ask if the NOT EXISTS is MySQL specific (I only use mysql) and there might be another syntax for mssql or oracle.
<cfcase value="isnull">
<cfif f.type eq "array"><!--- Special case for join properties --->
<cfif f.value>
NOT EXISTS (SELECT parentID FROM #application.dbowner##arguments.typename#_#f.property# WHERE parentid = #application.dbowner##arguments.typename#.objectid)
<cfelse>
EXISTS (SELECT parentID FROM #application.dbowner##arguments.typename#_#f.property# WHERE parentid = #application.dbowner##arguments.typename#.objectid)
</cfif>
<cfelse>
....