the case of construct() and the missing database row

[prev] [thread] [next] [Date index for 2004/07/15]

From: Patrick Michael Kane
Subject: the case of construct() and the missing database row
Date: 10:39 on 15 Jul 2004
I've noticed that construct() returns a CDBI object, even if you pass
it a hashref that does not correspond to a row in the database.  Is
this a feature?

If so, is there an easy way to check the returned object to see if it
actually came from the DB or not?

The context is occasionally we'll construct() a few hundred CDBI
objects and someone will have removed a row out from under us between
the time that the list of primary keys was generated and the time that
we called construct().  The app doesn't blow up until it tries to call
one of the has_a() methods on the bogus object.

Best,
        -- 
        Patrick Michael Kane
<modus@xx.xx.xx>

(message missing)

the case of construct() and the missing database row
Patrick Michael Kane 10:39 on 15 Jul 2004

Re: the case of construct() and the missing database row
Patrick Michael Kane 11:08 on 15 Jul 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52