Hi all,
I’m coming across a bit of a problem and not sure what’s going on.
If i run the following query via Taffy REST service, I get no results.
If it run it via a normal CFC, I get lots of results.
If i run it via Taffy but remove the activeae and activene parts
(booleans), then it returns the correct results. I’ve tried activeae=true
and activeae=1 with same results.
Any thoughts on what could be going on? Is it a Taffy bug? Or a
hibernate/ORM one? I’m including my Application cfc files below. Running Lucee
4.5.1.000 final and Postgresql 9.
Thanks,
Cage
var orsforpod = ormExecuteQuery(“select distinct t2 from roomsettings t2
where t2.validfor=:validfor
and t2.orpodid=:orpodid
and (t2.activeae=‘t’ or t2.activene=‘t’)”,
{validfor=validfor, orpodid=orpodid});
My taffy is in my approot/apiv1/ directory with the following Application.cfc:
component extends=“taffy.core.api”{
this.name = “myappnameapi”;
this.ormEnabled = true;
/* ORM Setting not suggested for production use*/
this.ormsettings = {datasource = “db_dev”, cfclocation = “…/models”, eventhandling = true};
header name="Access-Control-Allow-Origin" value="*";
variables.framework = {};
variables.framework.serializer = "myappname.server.apiv1.resources.CustomRepresentationClass";
variables.moment = createobject(‘component’,‘myappname.server.utils.moment’);
function onApplicationStart()
{
application.anythingToXml = createObject("component", "taffy.anythingtoxml.AnythingToXML").init();
application.ormsettings = this.ormsettings;
return super.onApplicationStart();
}
function onRequestStart()
{
return super.onRequestStart();
}
}
My models are in approot/models/ directory.
My application is in approot/ directory with the following Application.cfc
component {
this.name=“myappname”;
this.clientmanagement=“true”;
this.sessionmanagement=“true”;
this.setclientcookies=“true”;
this.setdomaincookies=“false”;
this.sessiontimeout=createTimeSpan(0,2,0,0);
this.applicationtimeout=createTimeSpan(1,0,0,0);
this.loginstorage=“session”;
this.ormEnabled = true;
this.mappings[“models”] = getDirectoryFromPath(getCurrentTemplatePath()) & “models”;
this.ormsettings = {};
this.ormsettings.datasource = “db_orrms_dev”;
this.ormsettings.cfclocation = this.mappings[“models”];
this.ormsettings.eventhandling = false;
variables.moment = createobject(‘component’,‘myappname.server.utils.moment’);
function onApplicationStart()
{
Application.dtmDateTime.dtmORSchedLastUpdated = 1;
}
function onRequestStart()
{
this.getApplicationSettings();
this.getRequestSettings();
}
function getApplicationSettings(){
Application.strVersion = "v2013";
}
function getRequestSettings(){
this.getApplicationSettings();
}
}