[prev] [thread] [next] [Date index for 2004/07/19]
OK, I redid my code so that I no longer have a has_a on my primary key.
Actually I redid the db and made use of the postgresql inheritance to
make things work the way I wanted (sort of anyway...pg offers inheritance
but not polymorphism).
I -still- get hung up in package DBIx::ContextualFetch line 51:
my $ret = $sth->SUPER::execute(@_);
whenever the program tries to createa row in the Models table.
I leave all the has_many methods off because those fields are removed
before CDBI sees them (yes, I verified that and it'd blow up if I didn't
get it right). Any insight appreciated...
package Webcontent::Tables::Subjects;
use strict;
use base qw(Webcontent::Tables);
__PACKAGE__->table('subjects');
__PACKAGE__->sequence('subjects_subject_id_seq');
__PACKAGE__->columns(Primary => qw/subject_id/);
__PACKAGE__->columns(Essential => qw/subject_id name about/);
__PACKAGE__->columns(Other => qw/picture picture_type/);
package Webcontent::Tables::Gender;
use strict;
use base qw(Webcontent::Tables);
__PACKAGE__->table('gender');
__PACKAGE__->columns(All => qw/index label/);
package Webcontent::Tables::Persons;
use strict;
use base qw(Webcontent::Tables::Subjects);
__PACKAGE__->table('persons');
__PACKAGE__->columns(Primary => qw/subject_id/);
__PACKAGE__->columns(Essential => qw/gender ethnicity haircolor lastname
eye_color age/);
__PACKAGE__->sequence('subjects_subject_id_seq');
__PACKAGE__->untaint_columns (
integer =>[qw/subject_id age ethnicity
haircolor eye_color/],
html =>[qw/lastname/],
printable=>[qw/gender/]
);
__PACKAGE__->has_a(gender => 'Webcontent::Tables::Gender');
__PACKAGE__->has_a(haircolor => 'Webcontent::Tables::Haircolor');
__PACKAGE__->has_a(eye_color => 'Webcontent::Tables::Eyecolor');
package Webcontent::Tables::Models;
use base qw(Webcontent::Tables::Persons);
__PACKAGE__->table('models');
__PACKAGE__->columns(Primary => qw/subject_id/);
__PACKAGE__->sequence('subjects_subject_id_seq');
__PACKAGE__->columns(Essential => qw/height weight shoe_size dress_size/);
1;
|
still hanging in _untaint_execute
|
Generated at 11:34 on 01 Dec 2004 by mariachi v0.52