| | 48 | |
| | 49 | |
| | 50 | == ColdFusion ORM == |
| | 51 | ColdFusion ORM is available in ColdFusion versions 9.0 and above, so no installation is necessary. |
| | 52 | |
| | 53 | Create a 'transfer' directory in {webroot}/fooproject/config and also a 'transfer' directory inside {webroot}/fooproject/model. |
| | 54 | |
| | 55 | Make sure that you have ORM enabled in your Application.cfc file. An example is: |
| | 56 | {{{ |
| | 57 | <cfset this.ormenabled = true /> |
| | 58 | <cfset this.datasource = "FooDataSourceName" /> |
| | 59 | <cfset this.ormsettings = {flushAtRequestEnd=false,automanageSession=false} /> |
| | 60 | }}} |
| | 61 | |
| | 62 | |
| | 63 | Connect ColdFusion ORM to !ModelGlue through !ColdSpring. Open {webroot}/fooproject/config/ColdSpring.xml and paste the following definitions: |
| | 64 | |
| | 65 | |
| | 66 | {{{ |
| | 67 | <!-- Example ColdSpring.xml for ColdFusion ORM in an MG:3 application --> |
| | 68 | <beans> |
| | 69 | ... |
| | 70 | <alias alias="ormAdapter" name="ormAdapter.cfORM" /> |
| | 71 | <alias alias="ormService" name="ormService.cfORM" /> |
| | 72 | </beans> |
| | 73 | }}} |
| | 74 | |
| | 75 | 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 ColdFusion ORM in your application. |
| | 76 | |
| | 77 | '''References''' |
| | 78 | |
| | 79 | * [http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSD628ADC4-A5F7-4079-99E0-FD725BE9B4BD.html] |