Thursday, November 6, 2008

Difference between read and find

Hello everybody,

I wonder what the difference is between

$this->Hotel->read(null, $id);
and
$this->Hotel->findById($id);

Hotel being my model with HABTM relations to a lot of other models.

The returned arrays look the same. Is read just a shortcut for findById?
Bake put me a lot of "read"s in my code, I personally never use it on my
own. Am I missing something?

Greetings

Anja

--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: