My table class is basically:

use base qw/DBIx::Class/;

__PACKAGE__->load_components(qw/PK::Auto Core HTMLWidget/);

# Set the table name
__PACKAGE__->table('mytable');

# Set columns in table
__PACKAGE__->add_columns(
    qw/mytable_id title date/
);

# Set the primary key for the table
__PACKAGE__->set_primary_key(q/mytable_id/);

That should cover off Paul's concerns.

It seems that set_primary_key can take either a single string or a reference
to an array of strings, but neither work for me. (Or rather, they work for
update but not insert).

On 10/12/2007, kevin montuori <[EMAIL PROTECTED]> wrote:
>
> >>>>> "PH" == Paul Henrich <[EMAIL PROTECTED]> writes:
>
> PH> You might check to make sure that you are loading PK::Auto in
> PH> MyAppDB::MyTable:
>
> I belive that with a recent DBIx::Class that's not necessary: perldoc
> DBIx::Class::PK::Auto indicates that "PK::Auto is now part of Core."
>
>
> k.
>
> --
> kevin montuori
> [EMAIL PROTECTED]
>
> _______________________________________________
> 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/
>



-- 
Regards,
Martin
([EMAIL PROTECTED])
IT: http://methodsupport.com Personal: http://thereisnoend.org
_______________________________________________
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/

Reply via email to