$this->set('tags', $this->User->Tag->find('list',
array('conditions'=>array('Tag.user_id'=>$this->Auth->user('id')...On Oct 4, 1:44 pm, GrandiJoos <[EMAIL PROTECTED]> wrote: > Hi all, > > I ran in a HABTM problem which I'll try to translate to the running > blog example used in the CakePHP documentation. > > Imagine a blog with multiple authors (users) who can post articles and > add tags to posts. Now assume that each author has its own set of > tags, this would result in the following relationships: > User HasMany Posts > User HasMany Tags > Posts HABTM Tags (and vice versa). > > Now, when a user creates a post I want to only show his collection of > tags, how would I do that? > Can I access the userId stored in the session from the model and > include it in the HABTM conditional field? Or is there another (neat) > trick necessary? > > Any help is appreciated! > > GrandiJoos --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
