I'm defining some objects using DBIx::Class::Schema with the intention of using deploy to create my tables and have come up with a couple questions. These maybe just me doing something simple wrong, so please be patient... I'm in information overload, ATM. :)
1) When you are using has_one can you overload the child object name? For example, if I have an object called system and want to attach a point_of_contact, owner and vendor and they are all actually user objects. I've tried '__PACKAGE__->has_one(Point_of_Contact => 'NEOpS::WDS::Users');' but that's not working. Any of the examples I've found just have simplest case usage with little or not extending of the concept.
2) I've been building this, from a directory point of view, in a very heirarchical manner. So for package NEOpS::WDS in the /lib/DB/NEOpS dir (this is in the catalyst framework dir stuc). There WDS.pm has
Then in the WDS dir, I have object_name.pm for each object I'm declaring. 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?package NEOpS::WDS; use base qw/DBIx::Class::Schema/; __PACKAGE__->load_classes(); 1;
Thanks,
2006-10-12 Retitled by castaway, as per Monastery guidelines
Original title: 'DBIx:questions'
In reply to DBIx::Class questions by jimbus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |