On Wed, Aug 4, 2010 at 7:34 AM, Steve <[email protected]> wrote:

> Hi all,
>
>>  I am bewildered as to why my 'many_to_many' relationship is being
>>> ignored.
>>> I get an error when trying to use the relationship because it 'does not
>>> exist',
>>> and clearly it doesn't.  WHY?
>>> My result classes are 'User.pm', 'Role.pm', and 'UserRole.pm'.
>>> I'm using the DBIC::Loader to generate the 'has_many', and 'belongs_to'
>>> relationships, which leaves me to create the 'many_to_many' relationship
>>> manually.
>>> ...
>>>
>>>
>>
>   include the error message please.
>>
>>  From memory: No such relationship roles in DCO::Schema::Result::User


So to be clear, you are saying that you added the roles many to many in user
and you do $user->roles and get that error?

I'm guessing you did something like $user->related_resultset('roles'), which
wouldn't work since technically m2m isn't a relationship.

I can't really say more though without seeing actual code and actual errors.


-- 
fREW Schmidt
http://blog.afoolishmanifesto.com
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to