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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to