Re: Problem with empty has_a

[prev] [thread] [next] [Date index for 2005/05/19]

From: Tony Bowden
Subject: Re: Problem with empty has_a
Date: 21:01 on 19 May 2005
On Thu, May 19, 2005 at 09:34:45PM +0200, Thomas Klausner wrote:
> Anyway, what's causing the problem 

Your database is in a state of broken referential integrity. In
particular you have a foreign key pointing at a table which doesn't have
an entry matching the value that you've given it.

> and what can I do to get rid of it.

Don't let your database get into this state? :)

I'm not sure what Class::DBI should do here. At the minute it takes
the view that if you've told it that the row exists, then it's happy to
believe you.

We could have select_row() in DBIx::ContextualFetch check to see if
there really was any results from fetching the row, and throw an
exception otherwise, but I'm not clear at a glance what the other
repercussions might be...

Tony

Problem with empty has_a
Thomas Klausner 19:34 on 19 May 2005

Re: Problem with empty has_a
Tony Bowden 21:01 on 19 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:05 on 20 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:39 on 20 May 2005

Re: Problem with empty has_a
merlyn (Randal L. Schwartz) 12:20 on 20 May 2005

Re: Problem with empty has_a
Tony Bowden 12:33 on 20 May 2005

Re: Problem with empty has_a
Perrin Harkins 13:43 on 20 May 2005

Generated at 15:51 on 25 May 2005 by mariachi v0.52