I dislike this also. Cake really should have more than 1 model type:
DAOModel and DataModel.

One deals with database interactions, while the other manipulates a
dataset for the view.

However, there is nothing stopping you creating these extra models.

$this->set('data', new UserDataModel($this->User->find()));

On Nov 12, 5:23 am, Joshua Muheim <[email protected]> wrote:
> I'd like to warm up this topic again. :-)
>
> I decided to pass model instances to the views instead of just their
> $data attributes. So is there a way to tweak the paginator to do
> exactly this?
>
> Thanks,
> Josh
>
> On Thu, Oct 28, 2010 at 8:26 PM, euromark <[email protected]> wrote:
> > i tend to do those things "on demand"
> > using a behavior to add new keys or even doing it in the model
> > afterFind() etc often results in additional work without actually
> > needing this information
> > but of course this depends on the particular case
>
> > On 28 Okt., 20:10, cricket <[email protected]> wrote:
> >> On Thu, Oct 28, 2010 at 10:03 AM, euromark <[email protected]> 
> >> wrote:
> >> > thats not correct for PHP5 anymore
> >> > in PHP4 you needed to do this
> >> > but in PHP5 it is passed by reference by default, afaik
>
> >> Agreed on passing the model to the view. But this could also be
> >> accomplished in afterFind(), adding new key => value to the data
> >> array.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to