[Dbix-class] last insert id problem with Oracle
Matt S Trout
dbix-class at trout.me.uk
Mon Jul 10 20:38:32 CEST 2006
Anthony Lincoln wrote:
> package ccm::Model::CCMData::Issweb::CcmChange;
>
> use strict;
> use warnings;
> use base 'DBIx::Class::Core';
>
> __PACKAGE__->load_components(qw/PK::Auto Core/);
> __PACKAGE__->table('ccm_change');
> __PACKAGE__->add_columns(qw/id owner name prereq_id dependent description
> backout_plan visibility risk sys_criticality
> sys_affected qa_difficulty install_difficulty
> problem_visibility completed creator created/);
> __PACKAGE__->set_primary_key('id');
> __PACKAGE__->sequence('ccm_seq');
Is your sequence "just a sequence" or do you have a trigger defined to
populate ccm_change from it? PK::Auto expects the database to populate the key
during INSERT; it doesn't read the sequence to populate it itself.
--
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