Skip to main content
Known Participant
April 15, 2011
Question

gt in orm

  • April 15, 2011
  • 1 reply
  • 794 views

Hello,

I can't seem to make this work:

user = entityLoad("users", {age > 18}, "true");

the > sign returns "Invalid construct: Either argument or name is missing." while if I use the = sign, no problem is raised.

Any suggestion?

Thanks

This topic has been closed for replies.

1 reply

Inspiring
April 15, 2011

If you read the docs for entityLoad():

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS32C28934-CDCE-497f-8212-6342141C5846.html

You'll note the second argument is a STRUCT.  So key/value pairs.  It's not the LHS and RHS of an expression, separated by an operator.

I suspect you want to be using ormExecuteQuery():

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSfd7453be0f56bba45b6e22cb12308efc3aa-8000.html

And perhaps a breeze through the rest of the docs for CF's ORM implementation before using it.  Don't try to remember everything, but just familiarise yourself with how it's supposed to work.

--

Adam