TLDR: new field not showing in query when using findAll.
-----------
In the sample code below (I removed the where clause section to make it simple and not wordy),
- query1 uses findAll and the new field is --not-- present
- query2 uses QueryExecute and the new field is present
Things I checked:
- I reloaded my "cfwheels" already (sample url: https://myhost.com/myapp/index.cfm/mycontroller/testonly?reload=production&password=mypassword)
- I made sure I am using the correct reload password. I tried this several times by copying/pasting from my text editor to browser URL bar.
- I checked my datasources in CF admin but I doubt it's incorrect since findAll and QueryExecute are using the same datasource.
Any ideas what I could be wrong?
Thanks
--------------
public void function testonly() {
params.format="json";
LOCAL.result = structNew();
LOCAL.result.datasource=get("dataSourceName");
LOCAL.result.query1 = model("mytable").findAll(where="insert-where-clause-here", returnAs="objects");
LOCAL.result.query2 = QueryExecute(
"select * from mytable where insert-where-clause-here here"
, []
, {datasource="#LOCAL.result.datasource#"});
renderWith(LOCAL.result);
}
--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cfwheels/a32cfbf2-3ea7-4e8b-87e5-bc79ea050fb5n%40googlegroups.com.