How would I do the following with CF ORM?
SELECT * FROM products WHERE id in ('3,7,12,5');
I tried
EntityLoad("products", { id in ('#productIDlist#') });
But no Joy.. getting error: Invalid construct: Either argument or name is missing. When using named parameters to a function, each parameter must have a name.
.. I am sure this is straight forward, but I can’t work out how to do this, and can’t find any samples or docs.
Many Thanks in advance.
You need to use HQL. It would look like:
You can also use parametize the query (similar to cfqueryparam).