[Dbix-class] possible bug in DBIC:ResultSet?
Mark Hedges
hedges at ucsd.edu
Tue Jun 6 22:25:32 CEST 2006
Sorry if someone found this already, I haven't read the list in
a couple weeks.
I use DBIC:Schema::Loader. I use the new loader args.
My::Schema package calls __PACKAGE__->connect to analyze and
load from Apache's startup.pl file.
In this example, a Foo has two text fields as an MCPK. No
auto-inc field is present in the table definition. I have a
class package for Foo that has a timestamp inflate/defalte.
In my script, if I do
My::Schema->resultset('Foo')->create({...});
it works fine.
But if I do
my $schema = My::Schema->connect();
$schema->resultset('Foo')->create({...});
it does this:
DBIx::Class::ResultSet::create(): Can't get last insert id
at (script) line 93
Stack:
[/usr/share/perl5/Carp/Clan.pm:214]
[/usr/local/share/perl/5.8.8/DBIx/Class/Schema.pm:692]
[/usr/local/share/perl/5.8.8/DBIx/Class/Row.pm:408]
[/usr/local/share/perl/5.8.8/DBIx/Class/PK/Auto.pm:53]
[/usr/local/share/perl/5.8.8/DBIx/Class/ResultSet.pm:1054]
[(script):93]
[...]
I don't load PK::Auto as a component in the Foo class. It is loaded
as a component in the class definitions of two other entities in the
system, though, but only in those two other files.
Mark
More information about the Dbix-class
mailing list