Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

ormSearch() and foriegn keys

$
0
0

I could very well be blind but looking across the docs and the internet I'm not seeing much spoken on trying to include foreign key fields in an ormSearch() query.

 

For example what if I was searching for people within a company and I knew their companyID?  How would I best go about doing this?

 

My best guess is the following but doesn't seem to return the results I wanted.  Yes, the foreign key field in my cfc is set to indexable=true.

 

<cfset result = ormSearch('lastname:#lastname#' AND companyID:#companyID#','Person') />

 

Any help is appreciated!


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>