CakePHP – Find, FindAll, Find(‘all’), Read


Use Model::read() when you have the ID, ie: you know the record you are referring to. Also read() will populate the Model::$data in a way suitable for Model::save() while find() will simply return the resultset array.

Use find() / findAll() / find(‘all’) to find records.

Both methods should fetch associated models given the correct Model::$recursive value.

Model::read is only a wrapper for Model::find

Source:

http://n2.nabble.com/Difference-between-read-and-find-td726658.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s