FWIW I'd prefer to see an error thrown if you attempt to load a record
that does not exist.

If you want to create a blank record with createRecord() that's fine,
but when you try to load data into that record and no matching primary
key is found then that should be an error.

Alternatively load() could return a Boolean to indicate whether it was
successful, but I think Doug has mention in another thread that this is
not possible as load() needs to return the record object.

Chris

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of wikiwikiman
Sent: 29 May 2006 21:26
To: [email protected]
Subject: Re: [Reactor For CF] What happens if I ask for a non-existant
record ?

I'm with you, Chris.

* If you ask the system to create a record, it will do so - data from
the table can only be added if it exists.

* If you want to know whether data exist in the table, you must ask
for it explicitly.

So I don't think the current behaviour of Reactor is wrong - and let's
keep it that way please!

You can always add a "createExistingRecord()" method yourself and do
any checking you like, but I don't think that should be part of the
standard Reactor-generated API.

Wouter



On 5/26/06, Chris Phillips <[EMAIL PROTECTED]> wrote:
> I'd like to throw in my vote of "NO" on thowing an error.
> I'd rather do my own checking to make sure it exists.
>
> Thanks,
>
> Chris Phillips


 

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