Check the set::extract, you might find something working for your needs.. ( have a look in the test cases, they are usually a very good tutorial :-)
On Jun 13, 11:13 pm, zw <[EMAIL PROTECTED]> wrote: > Thanks for the tip, I've done that before when finding a single > object, but that won't work for an array. I'll just work on writing > something in the model that loops through the results and returns an > array without the model name. > > On Jun 13, 6:28 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > If you don't like it (and you have no othermodelassociations as > > mentioned by AD7) you can change it in the controller: > > > $post = $this->Post->find(); > > $post = $post['Post']; > > > On Jun 12, 8:54 pm, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Jun 12, 9:44 pm, zw <[EMAIL PROTECTED]> wrote: > > > > > I've been using CakePHP for a few projects and really think it's a > > > > great frameworks except one thing. I can't get my head around why all > > > > results have themodelname in the associativearray. I don't see any > > > > benefit of doing this. If you're trying to get a Post object and you > > > > do: $post = $this->Post->find() > > > > It'sredundantonly if you have nomodelassociations unless you want > > > to risk for example, Post.comment being impossible to access. > > > > For > > > info.http://groups.google.com/group/cake-php/browse_thread/thread/e86a35ad... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
