[Catalyst] Dumb CDBI question
Philip Edelbrock
phil at edgedesign.us
Tue Aug 30 01:44:15 CEST 2005
Ack! Answered my own question by looking at CDBI::Generic. There's
"constraint" and "exclude". E.g.:
# M/CDBI.pm
__PACKAGE__->config(
dsn => 'dbi:Pg:dbname=mydb',
user => 'apache',
password => '4321',
constraint => 'mytable',
exclude => 'mytable2',
options => { AutoCommit => 1},
relationships => 1,
additional_base_classes => [qw/Class::DBI::FromForm
Class::DBI::AsForm/],
);
BTW- for Pg, I wonder why we can't just use the "oid" as the primary key
when a user-defined one isn't available?
Thanks!
Phil
Philip Edelbrock wrote:
>
>
> OK, I'm just playing around and know enough to be dangerous.
>
> I wanted to try making a simple CRUDS type system on a legacy database.
> I only want to deal with just one table right now, but my app is
> getting hung up on the first table it sees and dying because it does not
> have a primary key.
>
> What's the best way to make my app just look at a table or two that I
> care about (which have primary keys and should be otherwise fine for
> basic CDBI)? Do I need to move to something like CDBI::Sweet?
>
> Thanks!
>
>
> Phil
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
More information about the Catalyst
mailing list