I would like to retrieve some columns from a table, without the id column, but CakePHP keeps adding it to the find() array.
What should I do to solve this problem?
I would like to retrieve some columns from a table, without the id column,
Share
Use the find params to set the fields you want:
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
As I noted in the comments, when retrieving related model data, cake uses the id to get the related data in the foreign table. If you think about it, how else would CakePHP do it?
If you really must remove the id column, you can do so after the find call: