Reputation: 830
Merry Christmas!
I do have an question following to add two doctrine queries in symfony 1.4
$q1 = Doctrine_Query::create()
->from('order o')
->innerJoin('o.shop s ')
->innerJoin('o.customer c')
->where('o.id = ?', $this->orderid_hashed)
->fetchOne();
$testid = 19;
$q2 = Doctrine_Query::create()
->from('shopemployee se')
->where('se.id = ?', $testid);
$this->q_all = $q1+$q2;
So this is working, I guess. But how do I save now something in one of these tables. For example:
$this->q_all -> setOrder()-> setId('123');
or
$this->q_all -> setShopemployee()-> setId('123');
This above is not working. How can I do this? Thanks in advance!!!
Craphunter
Upvotes: 0
Views: 93
Reputation: 505
Why you don't using merge() in doctrine?
$data = array('name' => 'jimbob');
$User->Doctrine::getTable('User')->find(1);
$User->merge($data);
$User->save();
Upvotes: 2