FAQ
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.

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?

TIA,
Ekki

Search Discussions

  • Octavian Rasnita at Aug 27, 2010 at 5:39 am
    From: "Ekki Plicht (DF4OR)" <ep@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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedAug 26, '10 at 9:58p
activeAug 27, '10 at 5:39a
posts2
users2
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase