Hello,I have kicked up an error on my reactor-based project that appears to be based on reactor creating a validator cfc that does not consistently use the aliases defined in the reactor.xml file. This project is FB5-CS-REACTOR, but i dummied everything down to replicate this error without all the other frameworks involved. We use pretty formal field names in the database - (MSSQL 2000), which would be a drag to carry around in code, but is a snap with reactor's "aliases". Would love to get pass this one.The first part of the <cfif> _expression_ looks good and is using the alias but the second part is using the actual field name.I have pulled down all the SVN revisions since 1.0BC2. Made sure to delete all the generated files and get it from scratch.Is there any other files that I should reveal?here's my reactor.xml-<reactor>
<config>
<project value="RESEARCH" />
<dsn value="ManageIT" />
<type value="mssql" />
<mapping value="/RESEARCH/ReactorScratchData" />
<mode value="development" />
</config><objects>
<object name="Contacts" alias="Contact">
<field name="Contacts_ContactID" alias="ID" />
<field name="Contacts_ContactName" alias="Name" />
<field name="Contacts_ContactEmail" alias="Email" />
<field name="Contacts_UserID" alias="UserID" />
</object>
</objects>
</reactor>--------------------- HERE IS THE CODE - Real simple ------------------
<!--- create the reactorFactory --->
<cfset Reactor = CreateObject("Component", "reactor.reactorFactory").init(expandPath("reactor.xml")) /><!--- create a contactRecord --->
<cfset ContactRecord = reactor.createRecord("Contact") /><!--- populate the new record --->
<cfset ContactRecord.setName("John Doe") />
<cfset ContactRecord.setEmail(" [EMAIL PROTECTED]") />
<cfset ContactRecord.setUserID("jdoe") /><!--- validate the record --->
<cfset ContactRecord.validate() /><!--- save the record --->
<cfset ContactRecord.save() />------------ HERE IS THE ERROR (on the validate() call) ----------------
The method 'getContacts_ContactID' could not be found in component..\RESEARCH\ReactorScratchData\Record\ContactRecordmssql.cfc.Check to ensure that the method is defined, and that it is spelled correctly. The error occurred in (path)\Reactor\reactor1.0BC2\Reactor\project\RESEARCH\Validator\ContactValidator.cfc: line 119
Called from (path)\Reactor\reactor1.0BC2\Reactor\project\RESEARCH\Validator\ContactValidator.cfc: line 41
Called from (path)\Reactor\reactor1.0BC2\Reactor\project\RESEARCH\Validator\ContactValidator.cfc: line 15
Called from (path)\Reactor\reactor1.0BC2\Reactor\base\abstractRecord.cfc: line 86
Called from (path)\RESEARCH\index.cfm: line 22 117 : <!--- validate ID is numeric --->
118 : <cfif Len(Trim(arguments.ContactRecord.getID())) AND NOT IsNumeric(arguments.ContactRecord.getContacts_ContactID())>
119 : <cfset arguments.ErrorCollection.addError("Contact.ID.invalidType") /> 120 : </cfif> 121 :
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

