[Catalyst] [Beginner] model with MySQL, is many_to_many required?
Octavian Rasnita
octavian.rasnita at ssifbroker.ro
Fri Aug 27 05:39:46 GMT 2010
From: "Ekki Plicht (DF4OR)" <ep at plicht.de>
> Hi.
>
> Just getting around to implement the first user auth stuff, and as usual I
> am
> going along with MySQL. I know, I know, please no DB flame wars :-)
>
> As most of the docs are based on SqLite and Cat/MySQL docs are a little
> bit
> sketchy, I am unsure if my Schema requires the manual addition of the
> many_to_many relationship, or if this is just a requirement for SqLite.
Yes you need to manually add the many_to_many relationship.
Something like:
__PACKAGE__->many_to_many(roles => 'user_roles', 'role');
Octavian
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5400 (20100826) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
More information about the Catalyst
mailing list