ColdFusioning.com
Pronunciation \kold-fy-zhn-ing\ Noun: The actions of one that writes ColdFusion.

Please check out my new site: http://ja.mesbrown.com/

ColdFusion / Railo Object Relational Mapping - ORM Source Code and Notes

Tonight I gave a presentation on using ORM with ColdFusion or Railo. You can watch the recorded presentation on Adobe Connect. As promised, I'm publishing the source code from the meeting.

Since the code uses ColdBox and a database, it requires some setup. If you follow the steps below, you'll be able to get setup to run the examples:

  • Setup ColdBox with a mapping ("/coldbox") to the ColdBox source
    (I'm using Version 3115)
  • Unzip the source files to a empty directory
  • Setup a new site (I'm using "http://office.scribble/" in the examples)
  • In ColdFusion Admin
    • Setup a mapping "scribble" that points at the directory
    • Create a datasource pointing at a new database
  • Update Application.cfc with the new datasource (line 24)
  • Call the application from the browser

At this point, you should see the ColdBox version number and a list of actions. You'll want to run the "Reload" link first so the tables are all created. I'm not sure why, but if you receive an error on the "Reload" page, refresh the browser a couple times and I'll complete properly.

If you have problems setting up ColdBox, please refer to the ColdBox Documentation at http://wiki.coldbox.org/

Most of the code you'll be utilizing is in either /handlers/dev/ or /model/objects/

Also, I added a deleteContact example that wasn't covered in the presentation. It should be pretty self explanatory.

Lastly, this code is a basis to build on and should not be used in a production environment.

If you have any questions or problems, please leave a comment below.

Download Source Code



TweetBacks

Comments

hi ,
there was a problem with expanding the format in the rar file in the download , do you have an alternative download or format ?

# Posted By dom | 8/4/10 1:30 PM

Great stuff!! Keep them coming, would you like to contribute samples into the coldbox core?

# Posted By Luis Majano | 8/4/10 1:41 PM

@dom if you want to email me james at gulftobaytech.com I'll forward you another format.

@Luis Sounds good. I think this would be a good basis for getting people started using ORM with ColdBox.

# Posted By James Brown | 8/16/10 12:32 PM

# Posted By James Brown | 11/8/10 7:06 PM

Recent Comments

RSS

Subscribe