read
string $fields
string $id
根据$fields中的属性名从当前对象中读出对应的值,或者是$id指定的对象中读取。注意:read()方法仅级联读取该对象的一级关联对象,不管 model中的$recursive的值为多少。如果你是希望获取所有级联属性的话,请使用find()或者findAll()方法。
function testread(){
$this->autoRender = false;
$result =$this->Operator->read(array('id','loginname'),212);
echo "<pre>";
print_r($result);
echo "</pre>";
}
$this->Operator->id = 217;
$result =$this->Operator->read();