[coldbox-3.6.0] NooB here... need help understanding how to query sql server

Hello Coldbox Gurus… This is my first time with Coldbox (coming from Fusebox 5)
I’ve successfully setup coldbox 3.6 and am starting out with one of the AppTemplates.
I am going thru the examples (that’s the way i’m learning this) and got the simple_blog_5 to run on my pc.
However, I am having a hard time understanding how the models are querying the server to return the login info
I don’t see anywhere in any of the model cfcs using any type of sql statement.
Are there any other places I should look and will buying the book (v2.x) be useful to pickup on v.3.6 ???

Hi Derek–

The reason you don’t see any SQL queries is because this particular example is using ColdFusion ORM for persistence.

If you look in the model folder, you’ll see the persistent components, as well as the services for these entities which extend ColdBox’s awesome Virtual Entity Service…which ultimately provides a TON of really helpful features for taking ColdFusion ORM to the next level.

The entity services are then injected into the handlers, where the integration with the web app occurs. For example, in the admin/blog.cfc handler, you’ll see a savePost() method. In this method, a new entity is populated with data from the rc, and is then persisted via entryService.save( … ).

For more details on this, I’d definitely start with the CF documentation about ORM.

Next, be sure to check out Curt Gratz’s freshly-pressed presentation on ColdBox ORM services…it’s a really excellent introduction to all things ColdBox ORM, and would probably help connect the dots on the example you’re seeing.

And of course, be sure to keep posting here with questions–there are lots of helpful folks that are happy to answer any questions that you have.

Good luck!