Hi Roy
You can add a 'readonly' attribute to the column in your config file.
This means that reactor will read the computed column value, but won't
try to write data.
For example:
<object name="myTable" >
<field name="myComputedColumn" readonly="true" />
</object>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Roy Martin
Sent: 26 February 2008 19:04
To: [email protected]
Subject: [Reactor for CF] Saving records with computed columns
On our MSSQL 2000 database we have many computed columns that are then
indexed in our schema. A classic example is
alter table tableprefix_user add full_name AS (COALESCE(first_name, '')
+ ' ' + COALESCE(last_name,''))
Since a computed column cannot explicitly allow null reactor records it
determines that there is a validation error. The only work-around for
this seems to be to override the method for that column and simply
return the validationRecord without triggering any method calls to check
for errors. This is fine but we specifically try not to include any
custom methods in reactor generated code due to the problems it poses in
an SVN development environment.
Is there another work-around or could this be considered a bug?
Thanks,
Roy
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --