[Dbix-class] Duplicate entry error on create

Eden Cardim edencardim at gmail.com
Wed Dec 9 17:14:05 GMT 2009

>>>>> "Dermot" == Dermot  <paikkos at googlemail.com> writes:

    Dermot> __PACKAGE__->belongs_to( "contributor_id", "MyAPP::Schema::Contributors",
    Dermot>     { contributor_id => "contributor_id" },
    Dermot> );

Also note you might want to change this to

__PACKAGE__->belongs_to( "contributor", "MyAPP::Schema::Contributors",
    { contributor_id => "contributor_id" },

To avoid confusion between the contributor relationship and the
contributor_id column.

   Eden Cardim       Need help with your Catalyst or DBIx::Class project?
  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://edenc.vox.com/            http://www.shadowcat.co.uk/servers/

More information about the DBIx-Class mailing list