Re: the case of construct() and the missing database row

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

From: Perrin Harkins
Subject: Re: the case of construct() and the missing database row
Date: 17:09 on 15 Jul 2004
On Thu, 2004-07-15 at 07:08, Patrick Michael Kane wrote:
> The bad thing, for me at least, is that I don't find out that this has
> happened until I actually start calling methods on the object in
> question and the error that is returned.  I'd like to just skip the
> missing object and move on to the next one, without blowing up.

You could grab an exclusive lock on the object using something like
SELECT FOR UPDATE right before you start messing with it.  Then you
would only need to trap for errors on that one call.  The cure might be
worse than the disease though, in terms of the bottleneck that exclusive
locks can create.

- Perrin

(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

Re: the case of construct() and the missing database row
Perrin Harkins 17:09 on 15 Jul 2004

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