简体   繁体   English

一个学说1.2连接的输出将是什么

[英]what is going to be the output of a doctrine 1.2 join

how can i proceed with the resulting object after a left join what kind of a object do i get 左连接后如何处理生成的对象,我得到哪种对象

            $q = Doctrine_Query::create()
            ->from('Student s')
            ->leftJoin('s.Book b')
            ->where('s.std_number=?',$stdNumber);
        $studentBookCollection = $q->execute();

say the Student object have functions like getName() ,getAge().and Book object Have getPublisher(),getYear() and these two have a many to many raltionship and have a relationship table. 假设Student对象具有getName(),getAge()。和Book对象具有getPublisher(),getYear()之类的函数,并且这两个对象具有多对多关系,并具有关系表。

how can i use $studentBookCollection to get information about the book or the student. 我如何使用$ studentBookCollection获取有关这本书或学生的信息。

它正在返回一个学生对象,我可以使用getBooks()获取书籍

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM