Using reactor, if you want to set another column with the default of the primary key of the same row, when you use the save() method, the primary key is populated into the primary key setter function of the record object.

So now that the primary key is populated into your object, just update the secondary column setter with the primary key getter for that record with the value.

Teddy


On 7/18/06, Joshua Scott <[EMAIL PROTECTED]> wrote:
Ok Database Gurus out there.

I have a parent / child navigation table. To signify a parent I want the
parentID field to be the value of the primary key and if it is a child then
parentID would have the value of its parent.

Doing it manually is easy. Is it possible to set the default value of the
parentID field to be the primary key of the row? My goal is that if reactor
does not enter a value for that field it would default to the pkey value.

I am using SQL Server 2000.

Thanks for the help,

Josh



------------------------------------------------
Joshua Scott
Resonant Media Technologies, LLC.
http://www.resonantmedia.com | http://blog.resonantmedia.com


"It is impossible to get out of a problem by using the same type of thinking
that it took to get into the problem." -- Albert Einstein




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




--
<cf_payne />
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to