[Dbix-class] create_related is failing on second time through loop?

Tim Anderson tja824 at gmail.com
Fri Jun 22 16:41:23 GMT 2012


I updated the belongs_to, but get the same result.  I would think that if
that was going to make the difference, all inserts would fail, rather than
the first one succeeding and the second one failing.

On a hunch, I copied my test application to a local Ubuntu VirtualBox VM
and tried it there, and it works!  Consistently.  Now I'm less concerned
about the programming and more about the versions of installed modules, etc.

First off, I can contribute that the perl versions are both 5.10.1
(although the working version is 32-bit, vs non-working at 64)
DBIx::Class is at the same version
DBI was NOT at the same version. I downgraded the non-working version to
match, but still am getting the error.

I am going to continue down this path for a while, but if anyone has
pointers or hints on how to speed the 'what is different' process, I'd
appreciate hearing them.


-Tim


On Thu, Jun 21, 2012 at 4:22 PM, David Stevenson <hoagy at ytfc.com> wrote:

> Primary key declaration looks ok there, but I'm not so sure about the line
> { header_id =3D> "header_id" }
> in the belongs_to.
>
> I think I'd expect something like { 'foreign.header_id' =3D>
> 'self.header_id' }
>
> I wonder if missing out the 'foreign' bit from this is causing a problem?
>
> DS
>
> ..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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120622/c32=
2c754/attachment.htm


More information about the DBIx-Class mailing list