Thanks for the quick response Ben.

I am indeed setting a 'detail_id => 5' 2 times, but 'against' 2 different
header records.   On loop 1, the primary key for the new detail record is
'header_id: 1, detail_id: 5' and on loop 2 it is 'header_id: 2, detail_id:
5'.  I probably wasn't clear enough in the last post that the detail table
has header_id and detail_id as primary keys.

It's not a referential integrity problem; the database isn't even getting
called on the second loop..  It seems like something is not being released
or undef'd before the second loop occurs, but I can't put my finger on it.


-Tim


On Thu, Jun 21, 2012 at 2:46 PM, Ben Tilly <bti...@gmail.com> wrote:

> You are inserting two different records with the same detail_id into a
> table named detail that likely has a primary key on detail_id.
>
> I suspect that in your test script you wanted to set header_id to 5,
> not detail_id.
>

<snip>
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to