[Catalyst] [Beginner] model with MySQL, is many_to_many required?

Ekki Plicht (DF4OR) ep at plicht.de
Thu Aug 26 21:58:09 GMT 2010


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.

That shows probably that I still haven't grasped Models and Schemas fully, but 
so be it.

My Schema has the three usual auth tables: users, roles, user_roles. The 
latter one stores the relation with foreign keys, I am using InnoDB tables 
which support those.

User.pm has the 'has_many' sub, Role.pm has the 'has_many' sub, UsersRole.pm 
has two subs 'belongs_to', all automagically from the Schema::Loader. Anything 
else required?


More information about the Catalyst mailing list