RE: How to find all Authors that have a specific al-a-carte permission.

BINGO!!! I got it!

team = arrayNew(1);

authorSvc = controller.getWireBox().getInstance(“AuthorService@cb”);

rows = authorSvc.executeQuery(query=“from cbAuthor as a INNER JOIN a.permissions as p where p.permission=‘HBG_TEAM’”,asQuery=false);

for(row in rows){



Note that the loop of rows in rows.

The query returned an array which contained a sub array with two objects





Thus I stored it in a new array called Team.

Hope this helps someone at some point J


If you want a result similar to what you get from list(), you might try using a Criteria Builder query. Here is some untested code, but should show the general approach:

var c = **authorSvc.newCriteria();**
var permUsers = c.createAlias("permissions","perms", criteria.LEFT_JOIN )

And you make it look so easy! LOL … Muy Bein!


Marco G. Williams

Information Technology Manager

Global Electronic Technology

949.380.0345 x209

Btw – thanks this worked like a charm!

Marco G. Williams

Information Technology Manager

Global Electronic Technology

949.380.0345 x209

Sure thing, glad it was helpful!

Also, Brad did several performance tests on ORM and using for some reason ORMExecuteQuery was really really slow in comparison to Criteria Queries.

I was going to say where is your joins.

And I have done test to show that it is the other way around.

This test I have performed on 35 clients and all show the same results in production.

And if anyone wishes to test this with their ContentBox installation, login into their dashboard remotely from their production server. If the dashboard takes more than 1-2 secs to load then you suffer the same experience. There are other ways to tell with ContentBox from the actual user side as well.

So far every ContentBox installation people are using for their blogs have this issue. I have had System Administrator and DB administrators look into this issue for the last 2 years and the results are always the same.

If anyone wishes to see the tests live on a server.