CakePHP模型hasOne关联

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CakePHP模型hasOne关联相关的知识,希望对你有一定的参考价值。

This class var definition configures a Model to have a OneToOne relationship with a Model of another class.
  1. var $hasOne = array('Model' => array(
  2. 'className' => 'Model',
  3. 'conditions' => '',
  4. 'order' => '',
  5. 'dependent' => true,
  6. 'foreignKey' => ''
  7. ));

以上是关于CakePHP模型hasOne关联的主要内容,如果未能解决你的问题,请参考以下文章