parentNode is required for AclBehavior to work, I just posted the
first of two articles on using Auth and Acl to my site, should check
it out if that is what you are using the Acl for.

http://mark-story.com/Posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1

-Mark

On Jul 7, 10:40 am, francky06l <[EMAIL PROTECTED]> wrote:
> Of course, the "Department.1" can be used with the console. But if you
> have a User than belongsTo Departement, you could implement the
> parentNode() in the User model that will  send back the "Department"
> along with it's id.
>
> On Jul 7, 4:02 pm, Stinkbug <[EMAIL PROTECTED]> wrote:
>
> > I tried the model.id and it didn't work.
>
> > $user_array['foreign_key'] = $user['User']['id'];
> > $user_array['parent_id'] = 'Department.1';
> > $user_array['model'] = 'User';
> > $user_array['alias'] = 'User.' . $user['User']['id'];
>
> > but when I use just an id (integer) it does work.
>
> > $user_array['parent_id'] = 2;
>
> > I'm not familiar with the parentNode() method.  I couldn't find it in
> > the API.  Is this something that someone else has developed?  If so,
> > where can it be found?
>
> > If you have to use an integer id, surely there has to be an easy way
> > to retrieve it.  I guess it's all fine if you're doing everything
> > manually, but I want it automated.
>
> > On Jul 3, 5:05 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > @Stinkbug
> > > parent, as far as I know should be passed with model.id. However did
> > > you check the ACL behavior that can do this automatically if you
> > > implement the parentNode() method in the model (be aware of updating
> > > the parent though..) ?
>
> > > On Jul 3, 5:01 pm, Stinkbug <[EMAIL PROTECTED]> wrote:
>
> > > > To expand on this...
>
> > > > I almost figured out everything that I need to do to get my stuff
> > > > working.  The major problem I'm having now is with the parent_id.  Is
> > > > there anyway to retrieve the id by passing something like Department.1
> > > > (this would be the model and foreign_key, or alias)?
>
> > > > In the 1.1 version I could use an alias to set the parent, but that
> > > > doesn't seem to work in 1.2.  I didn't see anything in the API.  I
> > > > could write my own query to retrieve the data I want, but I was just
> > > > wondering if cake requires the unique id be used to set the parent, is
> > > > there not a way to retrieve that id?
>
> > > > I did notice a getAro method in the API, but I couldn't figure out how
> > > > to use it, so I don't know that it would do what I need.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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