IIf you use an auto-incremention identity for the primary key, you would not use the same key twice.  What I am interpreting is possibly a way to clean up your PK indices, which seems outside the scope of Reactor.

The case I am thinking of is when a display page shows PK 4 exists whereas another user just deleted PK 4.  Checking for existence of the PK before trying to process it on the action page or wherever you load the record object seems logical.  If it doesn't exist, I don't consider the data in error.  The process flow of the application would need to account for integrity issues.

Perhaps I am just being blind from a long weekend. 


On 5/30/06, Tom Chiverton <[EMAIL PROTECTED] > wrote:
On Tuesday 30 May 2006 13:12, Teddy Payne wrote:
> Thus, an empty object in Reactor and an empty cfquery seem

I talking about the case where you asked for something with primary key 4, and
it is not present. That's not a 'no result search' which I think is what you
were talking about, it's an actual error (maybe you messed up the code to
generate the link someone just clicked on).

> I do not think it is hard to check for empty values on a column that should
> contain a value.  If you know you have a column that has a default value,
> then why not check to see if the returned record is empty?

The obvious check is to look at the result from recordObj.load() and see if
the primary key is (still) empty, I suppose.

> I am going to check for the exists() method later.  If the exists() method
> is present, I would just call it.  If it does not, I would probably add
> this method to my best practices and always add it to my customizeable

Which is some of my point. If it doesn't exist, it should, because everyone*
is going to write one :-)

--
Tom Chiverton

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF.  A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.  If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.

We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the Year at the 2005 Growth Company Awards





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