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;
--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe
jim-dot-babcock-at-usa-dot-com
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.