Saving objects to the database


show more Saving objects to the database provides you with in-depth training on Developer. Taught by Daniel Short as part of the ColdFusion 9 New Features show less
please wait ...

Saving objects to the database

Pulling records out of the database is fun enough, but nothing really gets done, unless you can save data back to the database. In this video I am going to show you some gotchas with the way ColdFusion 9 and Hibernate save records. I am going to show you how to properly manage when changes you have made to your objects actually get saved. So to start, let's make sure that everything is still set up correctly for our ORM. In Application.cfc, we should have ORM enabled. Our cfcs are going to be in the cfcs directory and we have our SQL logging turned on.

Open up savingrecords.cfm. All we are doing is pulling one record out of the database and dumping it back to the screen. So to make things easier to see exactly what's going on with our SQL, I am going to dropout both the left and the right- hand columns. Then I am going to move the Console up here to the upper right and collapse this bottom section. Now, I can see my code on the left and all the SQL that's getting run on the righ...

Saving objects to the database
Video duration: 6m 10s 2h 40m Intermediate

Viewers:

Saving objects to the database provides you with in-depth training on Developer. Taught by Daniel Short as part of the ColdFusion 9 New Features

Subjects:
Developer Web
Software:
ColdFusion
Author:
please wait ...