Peter Karman scribbled on 2/22/07 11:15 AM:

> package AL::Fresco::User;
> use strict;
> use base qw(AL::Fresco::DB::Object);
> 
> __PACKAGE__->meta->setup(
>      table => 'users',
>      columns => [
>                id         => {type => 'int',     not_null => 1},
>                username =>
>                  {type => 'varchar', default => '', length => 63, not_null => 
> 1}
>      ],
>      primary_key_columns => ['id'],
>      relationships => [
>                        roles => {
>                                  map_class => 'AL::Fresco::UsersRoles',
>                                  type      => 'many to many',
>                                 }
>      ]
> );

found an answer.

changing the above relationship to:

     roles => {
            class      => 'AL::Fresco::UsersRoles',
            column_map => {id => 'users_id'},
            type       => 'one to many',
              },

did what I wanted.

-- 
Peter Karman  .  http://peknet.com/  .  [EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to