CodeIgniter Forums
Please help - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Libraries & Helpers (
+--- Thread: Please help (/showthread.php?tid=51389)

Please help - El Forum - 05-02-2012

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";