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

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

From: Tony Bowden
Subject: Re: the case of construct() and the missing database row
Date: 11:19 on 15 Jul 2004
On Thu, Jul 15, 2004 at 04:08:53AM -0700, 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.

There's no sensible way Class::DBI can handle this (assuming you're in a
transactionless environment) It's a classic race condition: at any point
between Class::DBI telling you the object represents a real live
database row, and you trying to do anything with it, someone else,
possibly on a different machine using an application written in Python,
could have removed the row you're referencing.

Tony

(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
Tony Bowden 11:19 on 15 Jul 2004

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