Return to Snippet

Revision: 5798
at April 4, 2008 20:18 by jesse


Initial Code
var $hasOne = array('Model' => array(
    'className'  => 'Model',
    'conditions' => '',
    'order'      => '',
    'dependent'  =>  true,
    'foreignKey' => ''
));

Initial URL
http://manual.cakephp.org/chapter/models

Initial Description
This class var definition configures a Model to have a OneToOne relationship with a Model of another class.

Initial Title
CakePHP Model hasOne association

Initial Tags
cakephp

Initial Language
PHP