#1 温作权
我的model是关联了var $linker = array(
array(
'type' => 'hasmany', //
'map' => 'store', //
'mapkey' => 'userid' ,
'fclass' => 'm_addstore',
'fkey' => 'userid',
'enabled' => true
),
array(
'type' => 'hasone', //
'map' => 'taste', //
'mapkey' => 'taste' ,
'fclass' => 'memu_taste',
'fkey' => 'id',
'enabled' => true
),
array(
'type' => 'hasone', //
'map' => 'ingredients', //
'mapkey' => 'ingredients' ,
'fclass' => 'memu_taste',
'fkey' => 'id',
'enabled' => true
),
);
三个表 ,我每次spLink()就会关联到3个表,但有时我只想其中的一个或两个表,怎么做呢?我担心关联太多表会运行会慢。求帮助,谢谢
2011-12-22 15:18:27