|laziness, impatience, and hubris|
DBIx::Class questionsby jimbus (Friar)
|on Oct 11, 2006 at 14:44 UTC||Need Help??|
jimbus has asked for the
wisdom of the Perl Monks concerning the following question:
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');'
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?
--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe