【发布时间】:2016-05-10 21:46:25
【问题描述】:
我正在尝试在 Lucee 服务器中使用 ORM,但继续收到错误 there is no Session for the datasource [mydatasource]。数据源确实存在并且连接正常,在管理员中验证并使用 cfquery 进行了测试。
这里是application.cfc
<cfcomponent>
<cffunction name="onRequestStart" access="public" returntype="boolean" output="false">
<cfset this.datasource = "rift" />
<cfset this.ormEnabled = true />
<cfsetting showdebugoutput="false" />
<cfset this.ormsettings = { } />
<!---<cfset this.ormsettings.dbcreate = "dropcreate" />--->
<cfset this.ormsettings.logSQL = true />
<cfset ORMReload() />
<cfset testquery = ORMExecuteQuery("from test")>
<cfreturn true />
</cffunction>
</cfcomponent>
【问题讨论】:
-
嗯...如果启用会话管理会发生什么?
标签: orm coldfusion lucee