Welcome Guest, Not a member yet? Register   Sign In
Problem with associations
#1

[eluser]Carmichael[/eluser]
I am using the php-activerecord ORM.

I am working on a permissions system. The system has three tables built in this way:
Code:
groups
id|name
1 |admin

permissions
id|permission|category
1 |  create  |  user
2 |   edit   |  user

permissions_map
group_id|permission_id
   1    |     1
   1    |     2

I want to know how I should build the associations in the Permission class.

This is what I want it to do:
Get group permissions by group id (from permissions_map)
Get group information (name) by group id (from groups)
Get permissions by group id (from permissions)


Messages In This Thread
Problem with associations - by El Forum - 07-03-2012, 03:49 PM
Problem with associations - by El Forum - 07-04-2012, 07:03 AM
Problem with associations - by El Forum - 07-04-2012, 12:42 PM
Problem with associations - by El Forum - 07-04-2012, 01:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB