Simple newbie question on relationships
[prev]
[thread]
[next]
[Date index for 2004/12/02]
As the title implies, I am new to Class::DBI. I have the following set
up (see below--of course, there is a base package...). However, in a
minimal example, it fails.
[holmes:~/annotation/perl/pg] sdavis% perl -MProbeDBI -e '0'
has_a needs a valid column at
/Library/Perl/5.8.1/Class/DBI/Relationship/HasA.pm line 12
Compilation failed in require.
BEGIN failed--compilation aborted.
How can I specify that analysis has_a db? db has_many analysis, but I
typically lookup by analysis and then gather information about analysis
rather than the other way around.
Thanks,
Sean
# -------------------------------------------------------------------
package ProbeDBI::analysis;
use base 'ProbeDBI';
__PACKAGE__->table('analysis');
__PACKAGE__->sequence('analysis_analysis_id_seq');
__PACKAGE__->columns(All => qw/analysis_id db_id platform_id done_date
program descripton file/);
__PACKAGE__->has_a('db', 'ProbeDBI::db' => 'db_id' );
# -------------------------------------------------------------------
package ProbeDBI::db;
use base 'ProbeDBI';
__PACKAGE__->table('db');
__PACKAGE__->sequence('db_db_id_seq');
__PACKAGE__->columns(All => qw/db_id db/);
|
Simple newbie question on relationships
Sean Davis 12:24 on 02 Dec 2004
|