2009年1月22日星期四

Re: [fw-db] Grabbing inherited roles from db using findManyToManyRowset()

Alrighty...

I've slept since the last time I was working on this :) but I have a simple question.

Is it possible to use one of the ManyToMany functions to gather ALL of the resources and corresponding privilege for ALL roles?

Right now I can do a simple SQL to gather this:
 select * from auth.roles t1 left join auth.roles_resources t2 on t1.id = t2.role_id left join auth.resources t3 on t2.resource_id = t3.id 
OR

I can loop through each role's rowset using findManyToManyRowset() which seems inefficient. Is there a more efficient way to use dbTable to gather the same results as above? Am I making this more complicating that necessary? I just wanted it to look neat in the database really (instead of using a serialized ACL).

View this message in context: Re: Grabbing inherited roles from db using findManyToManyRowset()
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: