No such thing as a small change | |
PerlMonks |
Catalyst with DBIx::Class User Roles Errorby Boydle (Initiate) |
on Jan 24, 2020 at 04:16 UTC ( [id://11111808]=perlquestion: print w/replies, xml ) | Need Help?? |
Boydle has asked for the wisdom of the Perl Monks concerning the following question: Hi, I hope someone can help me with a problem I am having with the user and roles structure as defined in the catalyst tutorial. I am working on a new project using Catalyst, DBIx::Class and HTML::FormFu I am fairly new to these 3 modules. I have used the tables and I am now trying to use a FormFu form to allow me to create a new user and assign roles to them. I am getting the following error: Caught exception in Indium::Controller::Admin::User->create "The primary key and the foreign key may not be the same column in class Indium::Schema::Result::UserRole at ..... I have tried adding a new id column to user_role and making it the primary key however this breaks the inbuilt $c->check_any_user_role('myrolename'); this does not error but returns false instead of true as expected and what was occurring before adding the id field as primary. Removing the primary also does not work. FormFu roles select:
The user creation itself is working if I remove the roles from the form. This is the user role_model
Back to
Seekers of Perl Wisdom
|
|