Installing an ORM

Reactor ORM

References

Transfer ORM

Download the latest Transfer ORM framework at [http://www.transfer-orm.com/?action=transfer.download], then extract it to your webroot.

Create a 'transfer' directory in {webroot}/fooproject/config and also a 'transfer' directory inside {webroot}/fooproject/model.

Following that, create two new .xml files named Datasource.xml and Transfer.xml inside {webroot}/fooproject/config/transfer. Datasource.xml file contains the datasource used by your application. Fill it out like so:

<?xml version="1.0" encoding="UTF-8"?>
<datasource xsi:noNamespaceSchemaLocation="../../transfer/resources/xsd/datasource.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>FooDataSourceName</name>
<username></username>
<password></password>
</datasource>

The contents of the Transfer.xml file define the objects Transfer ORM will manage for us. See the [Transfer ORM docs] for details on this step.

Lastly, connect Transfer to ModelGlue through ColdSpring. Open {webroot}/fooproject/config/ColdSpring.xml and paste the following definitions:

 <!-- Example ColdSpring.xml for Transfer ORM in an MG:3 application -->
 <beans>
  ...
  <alias alias="ormAdapter" name="ormAdapter.Transfer" />
  <alias alias="ormService" name="ormService.Transfer" />
  <bean id="transferConfiguration" class="transfer.com.config.Configuration">
   <constructor-arg name="datasourcePath"><value>/fooproject/config/transfer/Datasource.xml.cfm</value></constructor-arg>
   <constructor-arg name="configPath"><value>/fooproject/config/transfer/Transfer.xml.cfm</value></constructor-arg>
   <constructor-arg name="definitionPath"><value>/fooproject/model/data/transfer</value></constructor-arg>
  </bean>
 </beans>

You should now be able to use ModelGlue [Generic Database Messages] and [Scaffolds] powered by Transfer ORM in your application.

References

ColdFusion ORM

ColdFusion ORM is available in ColdFusion versions 9.0 and above, so no installation is necessary.

Make sure that you have ORM enabled in your Application.cfc file. An example is:

<cfset this.ormenabled = true />
<cfset this.datasource = "FooDataSourceName" />
<cfset this.ormsettings = {flushAtRequestEnd=false,automanageSession=false} />

Connect ColdFusion ORM to ModelGlue through ColdSpring. Open {webroot}/fooproject/config/ColdSpring.xml and paste the following definitions:

 <!-- Example ColdSpring.xml for ColdFusion ORM in an MG:3 application -->
 <beans>
  ...
  <alias alias="ormAdapter" name="ormAdapter.cfORM" />
  <alias alias="ormService" name="ormService.cfORM" />
 </beans>

You should now be able to use ModelGlue [Generic Database Messages] and [Scaffolds] powered by ColdFusion ORM in your application.

References