Hi all,
I'm using DBIx::Class and trying to get the 'id' back from a create()
call but I get nothing.
I have something like:
# db table also has an 'id' column which
# is set to auto_increment.
my $m = $c->model('MyAppDB::Foo');
my $res = $m->create({
name => 'adeola',
message => 'all for the sake of testing',
});
$c->log->debug("# ID OF LAST INSERT: " . $res->id);
So, instead of getting an id, I get nothing, not even 'undef' or
something like that. But the other fields (e.g. $m->name) returns what I
expect.
How do I get the 'id' of the resultset back? Am I missing something?
Thanks for your help,
Adeola.
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/