I am using Reactor revision 429 with Coldfusion MX7 and SQL Server 2005. The
query qFields (from the readFields method in reactor.data.mssql.ObjectDao) is
executed every time I validate a record object. I am running in production mode
on reactor. My understanding is that the qFields gets metadata about the
database so it makes sense for it to run the first time but in my case its
running every time I validate an object. qFields query doesn't run for any
other database operations other than validate. Has anyone else seen this. Is
this a bug? I first noticed this when I was creating a test app in Model Glue
so to be sure I took MG completely out and I am still seeing the same issue.
My application.cfm file looks like this
<cfsilent>
<cfapplication name="testapp" sessionmanagement="true"/>
<cfif not structKeyExists(application,'reactor') or isDefined("url.init")>
<cfset application.reactor = CreateObject("Component",
"reactor.reactorFactory").init(expandPath("reactor.xml")) />
</cfif>
</cfsilent>
My reactor configuration file is as follows
<reactor>
<config>
<project value="testapp" />
<dsn value="testdsn" />
<type value="mssql" />
<mapping value="/testapp/data" />
<mode value="production" />
</config>
<objects>
<object name="Post">
<hasMany name="Comment">
<relate from="PostId" to="PostId" />
</hasMany>
</object>
</objects>
</reactor>
And finally the code that I am using to test this
<cfset record = application.reactor.createRecord("Post")>
<cfset record.setPost("Post is going to be the post text ")>
<cfset record.setTitle("This is the post title")>
<!--if you remove validate qFields is not called-->
<cfset record.validate()>
<cfset record.save()>
Any help would be greatly appreciated.
Ali Syed
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --