ColdFusion ORM: ORM-CFC Generator Extension for Adobe ColdFusion Builder
When we started working on ColdFusion-ORM feature (me and Rupesh), the only way to provide ORM mapping was by using the hibernate XML file (hbm.xml). Later, we provided a way to specify the mapping in CFCs – ColdFusion-ORM would then take care of creating the hibernate mapping. This made life easier for the ColdFusion developers. Now we have the ORM-CFC Generator Extension in Adobe ColdFusion Builder which will generate ORM-CFCs automatically!
The Adobe CFC Generator can be downloaded from this location and the instructions to use it are here. The Adobe CFC Generator
- allows you to create ORM-CFCs from a set of tables.
- allows you to configure the ORM-CFCs – change the CFC-Name, change EntityName, change property-name, select/de-select columns, add relationships and join-conditions, etc.
- generates ORM-CFCs (of-course!)
- generates Service CFCs for each ORM-CFC that contain certain utility methods to work with the ORM-entities
Note that the Adobe CFC Generator is provided as a sample extension. When the extension is installed, the source-code for the extension can be found in the installed location. Using the source code, you can modify/customize the UI/ORM-cfcs/Service-cfcs to add additional functionality.
Check out this blog post – How Do I generate ORM CFC’s??? – A nice captivate demo which shows you how to install and use ORM-CFC Generator Extension. The CFBuilder team will be posting heavily on extensions in the coming days – do have an eye on that space.



Comments
So is it not built into ColdFusion Builder? You have to install it separately?
Thats partially correct.
ColdFusion Builder supports extensions. Extensions can be coded in CFML. “ORM-CFC Generator Extension” is one of the sample extensions provided by Adobe. The extension-installers are shipped as part of the installer. They need to be installed before you start working with them.
I have a problem with the ORM-CFC generator –
It generates a function named ‘createItem’ which accepts a corresponding ORM object as an argument. If this object type is passed to the function as a VO/DTO then any generated ID(s)/key(s) will not be created, rather they take on the values of whatever was passed in the VO/DTO. The object can then not be saved via hibernate since it’s generated properties have been assigned, and there is no way to drop the properties…
I find this information very useful. Great work! We study this article on the regular basis
. And we recommend this to every body.
I’m using Flash Builder 4 with the ColdFusion plug-in. Preferences does not show an Extension option under ColdFusion. How can I add the ORM-CFC generator? Thanks.
Write a Comment