Search code examples
phpsqlormdoctrine-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.

how can i use $studentBookCollection to get information about the book or the student.


Solution

  • it was returning a student object i can get the books by using getBooks()