[Catalyst] Relationship layout

Will Smith willbelair at yahoo.com
Mon Oct 3 16:15:37 CEST 2005

Oh, my bad. Yes, I put it right after the package definition. I just pasted in the wrong place. I would re-phrase my question as:
Once I have this has-many relationship declared, how would I use it? And if I have more than one relationship to this one table, would I declare the same way?
Please give me a specific line of instruction.

Dan Boger <perl at peeron.com> wrote:
On Mon, Oct 03, 2005 at 05:36:02AM -0700, Will Smith wrote:
> sub myrelation : Local {
> my ( $self, $c, $id ) = @_;
> Music::M::CDBI::Artist->has_many(cd => 'Music::M::CDBI::Cd');
> ### what goes here - I am a bit confused 
> $c->stash->{template} = 'Artist/testpage.tt';
> }

I don't think you should put the has_many in a sub - it should go right
after the package definition in M/CDBI/Cd.pm.

Or am I confused?

Dan Boger
perl at peeron.com

Catalyst mailing list
Catalyst at lists.rawmode.org

Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051003/23ac8d23/attachment.htm

More information about the Catalyst mailing list