in reply to DBIx::Class questions

When you are using has_one can you overload the child object name?

Yes, but if the accessor name is different from the column name, you have to specify both, so if you have colums in the current package called 'poc_id', 'owner_id', and 'vendor_id' that all refer to the uesrs table, then you would need something like this:

__PACKAGE__->has_one( 'Point_of_Contact', 'NEOpS::WDS::Users', 'poc_id' ); __PACKAGE__->has_one( 'Owner', 'NEOpS::WDS::Users', 'owner_id', ); __PACKAGE__->has_one( 'Vendor', 'NEOpS::WDS::Users', 'vendor_id', );

I've noticed that most of the examples I'm finding seem to be very flat by comparison... should I just to this all in the /NEOpS/WDS.pm

I think thats primarily a personal preference call, although I prefer to do it the way you are, with each class in it's own file, in a traditional perl-style directory structure.

And if you haven't already, check DBIx::Class::Relationship and DBIx::Class::Relationship::Base for the most complete (although not always clearest) docs on relationships.


We're not surrounded, we're in a target-rich environment!