I have Users and Dashboards. They both have a HABTM relationship with each other. How do I just retrieve all of a user’s dashboards, without any of the User data?
I tried this but it returns the User model as well:
$this->User->id = $this->Auth->user('id');
$this->User->find('all', array('contain' => 'Dashboard'));
You can set the
fieldsoption so that you retrieve only the id field and none of the others. (You probably can’t set it to fetch no fields at all.)