Sep 18, 2009

ColdFusion 9s ORM and Flex with a simple demo

It's been a while since I revisited a small issue I had with the ORM and Flex in ColdFusion 9. I made a simple example to try send actionscript VO's to ColdFusion 9 and treat the VO as a object the ORM can understand and perform its magic.

Thanks to Rupesh who contacted me over night I realized I missed adding:

unsavedvalue='0';

to the id of the component I was trying to save. The ORM kept thinking the VO I sent from Flex was an ID that didn't match to any ID in the actual database and was throwing errors. I added the missing attribute restarted the Application and I'm in business.

I didn't create a single line of SQL I let the ORM handle that but here is what was created in SQL 2008 in ~20 line of ColdFusion code:



Here is a small demo ( You Need Flash Player 10 ). You can right click to view the source. I'll also mention once more how nice it is to use script only notice that I don't have a single tag in my ColdFusion Code. The demo is very basic but demonstrates how simple a basic CRUD ( Create Update Delete ) could be.

Bring on CF9!



This demo is hosted on Hostek's ColdFusion 9's Beta plan.

1 comments:

  1. Looks like possibly a stealth update. This only started working for me recently, but very glad it's in there as expected now!

    ReplyDelete