Hi Wayne and others, Do you get a successful working code , if so pls tell the idea ? I have 1 doubt to you why we need to use Model in this case , do we can Tackle this in Controller itself ?
I am newbie , reply me Thanks Anes On Mon, Aug 20, 2012 at 3:53 PM, WayneW <waynewhi...@hotmail.com> wrote: > Beginner here. I have a model class called "Route" and I've been > struggling to find documentation / tutorials on how to use a model that > isn't based on an underlying db table. At the moment, my model has the > following attributes (note that useTable is set to false): > > //this model does NOT use a database table - very important >> public $useTable = false; >> >> //route id >> public $id; >> >> //textual description of the route >> public $desc = ''; >> > > My main question is: If my app uses multiple routes (which it will), how can > I create multiple instances of this model? For instance, I know that I can do > this in my controller: > > $this->loadModel('Route'); >> $this->Route->id = 1; >> > > However, I can't do this: > > $route1 = $this->Route; >> $route2 = $this->Route; >> > > Do I need to create another model that will store these routes? I'm kind > of hesitant to proceed until I figure out the right way to do this. > > > > > > -- > 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 > cake-php+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. > > > -- 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 cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.