Skip to content

Instantly share code, notes, and snippets.

@cakephp-tutorial
Created February 27, 2016 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cakephp-tutorial/6bbdf4bb757ba4fe70e9 to your computer and use it in GitHub Desktop.
Save cakephp-tutorial/6bbdf4bb757ba4fe70e9 to your computer and use it in GitHub Desktop.
<?php
$resultset = $ModelName->find('all', array(
'recursive' => '1',
'contain' => 'Model',
'fields' => array(
'Model.field',
'OtherModel.field',
),
'conditions' => array(
'Model.id' => 3,
)
),array('cache' => 'Nomefilecache', 'cacheConfig' => 'short'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment