Maybe I have a more basic misunderstanding... let me list my actual definitions and see what you think and I'll read other the documents suggested.
WDS.pm
package NEOpS::WDS; use base qw/DBIx::Class::Schema/; __PACKAGE__->load_classes(); 1;
Systems.pm
package NEOpS::WDS::Systems; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->table('systems'); __PACKAGE__->add_columns(obid => { accessor => 'elements', data_type => 'integer', size => 16, is_nullable => 0, is_auto_increment => 1, default_value => '', }, name => { data_type => 'varchar', size => 64, is_nullable => 1, is_auto_increment => 0, default_value => '', }, descrip => { data_type => 'varchar', size => 256, is_nullable => 1, is_auto_increment => 0, default_value => '', } ); __PACKAGE__->set_primary_key('obid'); __PACKAGE__->has_one('username', 'NEOpS::WDS::Users', 'Point_of_Contac +t' ); 1;
Users.pm
package NEOpS::WDS::Users; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->table('users'); __PACKAGE__->add_columns(obid=> { accessor => 'users', data_type => 'integer', size => 16, is_nullable => 0, is_auto_increment => 1, default_value => '', }, username=> { data_type => 'varchar', size => 64, is_nullable => 0, is_auto_increment => 0, default_value => '', }, password=> { data_type => 'varchar', size => 64, is_nullable => 0, is_auto_increment => 0, default_value => '', }, firstname=> { data_type => 'varchar', size => 64, is_nullable => 1, is_auto_increment => 0, default_value => '', }, lastname=> { data_type => 'varchar', size => 64, is_nullable => 1, is_auto_increment => 0, default_value => '', }, email=> { data_type => 'varchar', size => 128, is_nullable => 0, is_auto_increment => 0, default_value => '', }, active=> { data_type => 'integer', size => 16, is_nullable => 0, is_auto_increment => 0, default_value => '', } ); __PACKAGE__->set_primary_key('obid'); __PACKAGE__->has_many(role, 'NEOpS::WDS::Roles', role); 1;
Roles.pm
package NEOpS::WDS::Roles; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->table('roles'); __PACKAGE__->add_columns(obid=> { accessor => 'roles', data_type => 'integer', size => 16, is_nullable => 0, is_auto_increment => 1, default_value => '', }, role=> { data_type => 'varchar', size => 64, is_nullable => 0, is_auto_increment => 0, default_value => '', } ); __PACKAGE__->set_primary_key('obid'); 1;
In reply to Re: DBIx::Class questions
by jimbus
in thread DBIx::Class questions
by jimbus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |