Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ormSearch() and foriegn keys

Community Beginner ,
Apr 28, 2014 Apr 28, 2014

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!

166
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources