View Single Post
  #1 (permalink)  
Old 05-08-2008, 02:05 PM
bennell bennell is offline
Junior Member
 
Join Date: May 2008
Posts: 12
Default intersect tables with extra column

Hello,
I am trying to create ACL persistence using Zend_DB. I have 4 tables:
AclRoles - stores roles
AclResources - stores resources
AclPrivileges - stores privilege keys, and has a foreign key matching the privilege to a resource.
AclPrivileges_AclRoles - is an intersect table which matches Roles to privileges. So it has one column for a role id, one column for a privilege id, and one extra column describing the relationship, which is either allow or deny.

I have mapped out the tables and relationships using Zend_Db_Table_Abstract, but I cannot figure out how to get the information in that third column in the intersect table, the allow / deny information. Does anyone have any experience doing this?

I know I could store the allow / deny in the privileges table, but then I would need two entries for each privilege.

Thanks in advance!
Reply With Quote