[Dbix-class] Empty inserts with add_to_... and create
Matt S Trout
dbix-class at trout.me.uk
Thu Jan 12 22:17:01 CET 2006
On Thu, Jan 12, 2006 at 12:01:37AM -0800, apv wrote:
> I'm getting a weird error when trying to create() or add_to_...(). I've
> checked my args and such, sorry no code right now, but the underlying
> stuff seems sound and is working in relational find() or manual INSERTs
> with the identical args. It seems like the args are not even getting
> passed through to create(). new() works but insert() or create() or
> add_to...() die with this message:
>
> DBD::mysql::st execute failed: Cannot add or update a child row: a
> foreign key constraint fails [for Statement "INSERT INTO chapter ()
> VALUES ()"] at
> /usr/local/lib/perl5/site_perl/5.8.2/DBIx/Class/Storage/DBI.pm line 187.
>
> Does this ring a bell with anyone?
Is there any chance of you posting some of the code so we can see what's
going on? Also, what DBIx::Class version are you using?
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list