Re: [Fwd: Re: Many-to-Many with just on table plus linking table]

[prev] [thread] [next] [Date index for 2005/04/04]

From: Brett Sanger
Subject: Re: [Fwd: Re: Many-to-Many with just on table plus linking table]
Date: 21:07 on 04 Apr 2005
On Mon, Apr 04, 2005 at 03:41:53PM -0500, Jay Strauss wrote:
> It could be that you are passing an array ref in your has_many
> 
> >Forum::Message->has_many(messages => [Forum::Topic => 'message']);
> >Forum::Message->has_many(topics => [Forum::Topic => 'topic']);
> 
> Try
> 
> Forum::Message->has_many(messages => Forum::Topic => 'message');
> Forum::Message->has_many(topics => Forum::Topic => 'topic');

That adds an error message (undefined value in sprintf), but does not
cause it to behave as intended.

As I understand the docs, the arrayref is the correct way to use the
mapping option of has_many.  It's also used in the Actor/Film/Role
example from the docs.

        -- 
        SwiftOne  /  Brett Sanger
swiftone@xxxxxxxx.xxx   

(message missing)

Re: [Fwd: Re: Many-to-Many with just on table plus linking table]
Brett Sanger 21:07 on 04 Apr 2005

Generated at 09:29 on 27 Apr 2005 by mariachi v0.52