【发布时间】:2015-03-31 10:41:20
【问题描述】:
左连接后如何处理生成的对象我得到什么样的对象
$q = Doctrine_Query::create()
->from('Student s')
->leftJoin('s.Book b')
->where('s.std_number=?',$stdNumber);
$studentBookCollection = $q->execute();
假设 Student 对象具有 getName() 、getAge() 等函数。而 Book 对象具有 getPublisher()、getYear() ,这两个具有多对多关系并具有关系表。
我如何使用 $studentBookCollection 来获取有关图书或学生的信息。
【问题讨论】:
标签: php sql orm doctrine-1.2