That's a latest 1.2 thing right?

Looks very interesting.

Really what I'm trying to do is the other way round. I'm trying to do
it with a single query, which should be fairly easy (the sql is a
trivial join). Basically, the logic is to get all the users which are
within a certain group (branch) of the tree from a known point down,
the goal being that users can edit the tree in some sort of interface,
but only for entries beneath their current level.

I could do this with an acl lookup and a loop through the results to
get the user details, but this is a nasty clientside join.

The node function does it the other way around, but does anyone know
of an extension to this behaviour which allows me to select users
based on a condition relating to their acl position?

On Jun 29, 7:40 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:
> Why would you want to have ARO joined with User Model, just a question
> out of curiosity.
>
> You may want to check into ACL behavior
>
> var $actsAs = array('Acl'); // add this statement to your model
>
> and for more information check out acl.php in cake/libs/model/behavior
>
> Cheers,
> Ketan ;-)
>
> [EMAIL PROTECTED] wrote:
> > Is it possible to use the Aro model in a join with a regular model
> > based on AppModel, such as Users.
>
> > What I'm trying to achieve is
>
> > class Users extend AppModel {
> >     var $hasMany =
> > array('Aro'=>array('className'=>'Aro','foreignKey'=>'foreign_key'));
> > }
>
> > This seems to work.
>
> > However...
>
> > If I try
> > $this->User->findAll(array('Aro.lft' => '> x', 'Aro.rght' => '< y'))
>
> > where x and y are known values,
>
> > then it doesn't work, and just returns false. I've checked the data,
> > which is fine, however, there just doesn't seem to be a query
> > generated for this findall. I'm not quite sure where it's falling
> > apart, but i'm guessing it's in the sql builder somewhere due to the
> > unusual join.
>
> > Am I missing something here?
>
> > Simon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to