Yep, pretty good. How does that code know which database or which table to update?

The examples I seen with the amount of code required to make that happen, I could create a few crud functions in a cfc and basically do what you did in the cfscript part.

Tom


At 09:44 PM 12/3/2009, you wrote:
Hey Tom,

The ORM takes care of writing the code to translate queries into objects, so you don't have to actually do that. To illustrate, take a look at this code:

<cfcomponent>
<cfproperty name="FirstName" type="String" />
<cfproperty name="LastName" type="String" />
</cfomponent>

<cfscript>
User = CreateObject('User');
User.setFirstName('Tom');
User.setLastName('Thomas');

User.save();
</cfscript>

With an ORM behind it, that code just created or update a user with the name Tom Thomas in the db. Not a single line of SQL needed to be written. Not bad eh.

Cheers,
Baz


--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
 
!! save a network - please trim replies before posting !!

--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
 
!! save a network - please trim replies before posting !!

Reply via email to