Welcome Guest, Not a member yet? Register   Sign In
Please help

It is related to datamapper ORM

Rights: var $has_many = array("roles"); - it has rights entered in table
Role: var $has_many = array("rights"); - it has rights entered in table

Relation will be roles_rights

What I am doing is I am setting perimssion for one of my role say manager
   insertAction   Radiobutton1 Radiobutton2
   deleteAction   Radiobutton1 Radiobutton2

When I click on save button it should save in relation table, roles_rights. But is is not happening. Can anyone figure out what the problem is?

I am not able to save the data.

Actual code

$role = new Role();
  $exists = $role->exists();
   $right = new Right();
   $right->role_id = 18;
   $right->right_id = 1;
   $right->permission = 1;
   $isSaved = $role->save($right);
   echo "Saved";
   echo "No Saved";


Theme © iAndrew 2016 - Forum software by © MyBB