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