I want to use active record as a expect in my api_method.However if i
try to do that i get an error stating active records cant be used as
expects.
I know i can use structs,but that would a wrong way and duplication of
code.
Any help is appreciated.
Thanks
Vishal
G’day Vishal,
I had this same problem myself.
What you need to do is add the following code to your API class
allow_active_record_expects true
You’ll need to be REALLY careful though with methods that do inserts
or updates to make sure you don’t allow the RPC clients update things
they shouldn’t.
Daniel