[EMAIL PROTECTED] wrote:
here is the code :
$schema->resultset('tableX')->create(\%record);
here is dump of the %record :
$VAR1 = {
'field6' => '1',
'field5' => 'PP ',
'field1' => '00000000000011716438',
'field2' => 0,
'field3' => '0000001',
'field4' => '102737 '
};
and here is what i see when run the script like this :
# DBIC_TRACE=1 ./loader.pl
INSERT INTO tableX (field1, field2, field3, field4, field5, field6) VALUES
(?, ?, ?, ?, ?, ?): '00000000000011716438', '0', '0000001', '102737
', 'PP ', '1'
DBIx::Class::ResultSet::create(): Can't get last insert id at
/path/to/Loader.pm line 114
You didn't pass a PK and mysql's not letting you get the inserted id back - is
the PK marked AUTO_INCREMENT?
--
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/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/