Hi,

I tried this, but with no effect, no error messae, but the select returns 
all found data without the contain conditions.
Please help me....

$results = ClassRegistry::init('Eigenschaftsarten')->find('all', array(
'contain' => array(
'Uebersetzungen' => array(
'fields' => 'UEB_TEXT, UEB_FKID_SPR_ID',
'conditions' => array('UEB_FKID_SPR_ID' => 
CakeSession::read('Config.languageID'))
)
),
'fields' => 'EIA_ID, EIA_UEN_BESCHREIBUNG',
'conditions' => array(
'EIA_ID IN ('.implode(',', $array).')'
)
));

Model  'Eigenschaftsarten' 
class Eigenschaftsarten extends AppModel {
var $name = 'Eigenschaftsarten';
var $useTable = 'Eigenschaftsarten';
var $primaryKey = 'EIA_UEN_BESCHREIBUNG';

var $hasMany = array(
'Uebersetzungen' => array(
'className' => 'Uebersetzungen',
'foreignKey' => 'UEB_NUMMER',
     'conditions' => array('UEB_FKID_SPR_ID' => 1) <= this is the place I 
wanted to use my session language ID, which I deleted now for testing of 
the contain stuff
)
);
}

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to