This commit is contained in:
Martin Müller 2014-04-29 21:29:28 +02:00
parent 45393e5258
commit 6caa98accc
1 changed files with 7 additions and 7 deletions

View File

@ -47,9 +47,9 @@ class DreamjobJobMsg extends AppModel {
$dataSource->begin(); $dataSource->begin();
$result = $this->save(); $result = $this->save();
if($result){ if($result){
$con = array('conditions' => array('Application.id' => $result["DreamjobJobMsg"]["application_id"])); $con = array('conditions' => array('DreamjobJobApplication.id' => $result["DreamjobJobMsg"]["application_id"]));
echo "Lola"; echo "Lola";
$app = $this->Application->find('first' ); $app = $this->DreamjobJobApplication->find('first' );
echo var_dump($app); echo var_dump($app);
exit(1); exit(1);
@ -126,29 +126,29 @@ class DreamjobJobMsg extends AppModel {
) )
);*/ );*/
public $hasOne = array( public $hasOne = array(
'Application' => array( 'DreamjobJobApplication' => array(
'className' => 'DreamjobJobApplication', 'className' => 'DreamjobJobApplication',
'foreignKey' => false, 'foreignKey' => false,
'conditions' => array('Application.id = DreamjobJobMsg.application_id'), 'conditions' => array('DreamjobJobApplication.id = DreamjobJobMsg.application_id'),
'fields' => '', 'fields' => '',
'order' => '' 'order' => ''
), ),
'Opening' => array( 'Opening' => array(
'className' => 'DreamjobJobOpening', 'className' => 'DreamjobJobOpening',
'foreignKey' => false, 'foreignKey' => false,
'conditions' => array('Opening.id = Application.opening_id'), 'conditions' => array('Opening.id = DreamjobJobApplication.opening_id'),
'limit' => 1 'limit' => 1
), ),
'AppUserWorker' => array( 'AppUserWorker' => array(
'className' => 'AppUser', 'className' => 'AppUser',
'foreignKey' => false, 'foreignKey' => false,
'conditions' => array('Application.worker_id = AppUserWorker.id'), 'conditions' => array('DreamjobJobApplication.worker_id = AppUserWorker.id'),
'limit' => 1 'limit' => 1
), ),
'Worker' => array( 'Worker' => array(
'className' => 'User', 'className' => 'User',
'foreignKey' => false, 'foreignKey' => false,
'conditions' => array('Application.worker_id = AppUserWorker.id and Worker.id = AppUserWorker.user_id'), 'conditions' => array('DreamjobJobApplication.worker_id = AppUserWorker.id and Worker.id = AppUserWorker.user_id'),
'limit' => 1 'limit' => 1
), ),
'AppUserCompany' => array( 'AppUserCompany' => array(