> Cake 1.2 has not been officially released yet, but it has a core class
> called Set, which allows you to map query results onto an object.  The
> syntax for that is:
>
> $this->set('posts', Set::map($this->Post->findAll()));

This is interesting - does it mean we will be able to do things like :

$post = Set::map($this->Post->findAll('author = "spammer"'));
while($post->fetch()) {
  $post->hide();
}

? Or things like :

$author = Set::map($this->Author->find('name = "spammer"'));
$post = $author->getPosts();
while ($post->fetch()) {
  $post->hide();
}

?

Anselm
--
------------------------
PS.
Hi everyone :) I'm currently evaluating CakePhp. I need a Php
framework, and having had a look around I found that, on top of having
readable code and a good architechture, CakePhp had the best comunity
infrastructure - which is a very important point.

As I've been looking more in-depth today, the one thing I've been
wondering about is the lack of object models (ie. doing the kind of
things I mentioned above). However I read somewhere that this feature
had been delayed to make sure that the 1. release would be a very
stable release. Knowing that the developers favor stability over
features (but that the feature will be there some point in the future)
is maybe more important that having the feature now, so that is not a
bad point.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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