| | 5 | == Transfer ORM == |
| | 6 | Download the latest Transfer ORM framework at [[http://www.transfer-orm.com/?action=transfer.download]], then extract it to your webroot. |
| | 7 | |
| | 8 | Create a 'transfer' directory in {webroot}/fooproject/config and also a 'transfer' directory inside {webroot}/fooproject/model. |
| | 9 | |
| | 10 | 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: |
| | 11 | {{{ |
| | 12 | <?xml version="1.0" encoding="UTF-8"?> |
| | 13 | <datasource xsi:noNamespaceSchemaLocation="../../transfer/resources/xsd/datasource.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| | 14 | <name>FooDataSourceName</name> |
| | 15 | <username></username> |
| | 16 | <password></password> |
| | 17 | </datasource> |
| | 18 | }}} |
| | 19 | |
| | 20 | The contents of the Transfer.xml file define the objects Transfer ORM will manage for us. See the [[http://docs.transfer-orm.com/ Transfer ORM docs]] for details on this step. |
| | 21 | |
| | 22 | Lastly, connect Transfer to !ModelGlue through !ColdSpring. Open {webroot}/fooproject/config/ColdSpring.xml and paste the following definitions: |
| | 23 | |
| | 24 | |
| | 25 | {{{ |
| | 26 | <!-- Example ColdSpring.xml for Transfer ORM in an MG:3 application --> |
| | 27 | <beans> |
| | 28 | ... |
| | 29 | <alias alias="ormAdapter" name="ormAdapter.Transfer" /> |
| | 30 | <alias alias="ormService" name="ormService.Transfer" /> |
| | 31 | <bean id="transferConfiguration" class="transfer.com.config.Configuration"> |
| | 32 | <constructor-arg name="datasourcePath"><value>/fooproject/config/transfer/Datasource.xml.cfm</value></constructor-arg> |
| | 33 | <constructor-arg name="configPath"><value>/fooproject/config/transfer/Transfer.xml.cfm</value></constructor-arg> |
| | 34 | <constructor-arg name="definitionPath"><value>/fooproject/model/data/transfer</value></constructor-arg> |
| | 35 | </bean> |
| | 36 | </beans> |
| | 37 | }}} |
| | 38 | |
| | 39 | You should now be able to use !ModelGlue [[http://docs.model-glue.com/wiki/HowTos/HowToUseGenericDatabaseMessages Generic Database Messages]] and [[http://docs.model-glue.com/wiki/HowTos/HowToUseScaffolds Scaffolds]] powered by Transfer ORM in your application. |
| | 40 | |
| | 41 | '''References''' |