Yes, - hmmmm -  something else must be seeting it to an empty string.... will check
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of João Fernandes
Sent: 15 August 2006 13:57
To: [email protected]
Subject: Re: [Reactor for CF] Validation Question

What I cannot understand is why your PK is different from 0.
If you create a blank record, your numeric PK field should be always 0 so validate() souldn't throw errors at all.

João Fernandes

On 8/15/06, Kevin Roche <[EMAIL PROTECTED]> wrote:
Good shot, Denny!
 
That works thanks.
 
Kevin
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Denny Valliant
Sent: 15 August 2006 10:48
To: [email protected]
Subject: Re: [Reactor for CF] Validation Question

Total shot in the dark, but have you tried a value of zero (0) for the ID?

Again, just a guess.  I'm still building queries... :-)

On 8/15/06, Kevin Roche <[EMAIL PROTECTED]> wrote:
Hi,

I want to use validate() to check an object before I update it or add it to
the database.

For updates everything works as expected.

Unfortunately since the object has an identity primary key it must be empty
when adding and validate gives an error.

Is there a way around this? Or do I just ignore this error in this
situation?


Kevin Roche

----------------------
User Group Manager
Thames Valley CFUG UK

Come along to TVCFUG on 23 August to hear Michael Smith of TeraTech talk on
"What makes a smart coder?".
http://www.ukcfug.org
----------------------





-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

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

Reply via email to