Why is the doctrine returning more fields than I requested?
I've been tinkering with Doctrine (version 1.0.3) to see if this would work well for the collection of applications I'm writing.
I am trying to execute a query and only return 3 fields. I am getting the correct fields in one table, but in the join table, I am getting everything when I only need one field. I wrote that the SQL should be in phpMyAdmin and it only returns what I need.
31 $ftp_info = Doctrine_Query::create()
32 ->select('f.uid, f.home, s.identifier')
33 ->from('FtpUser f')
34 ->leftJoin('f.Submitter s')
35 ->where('f.uid = ?',500)
36 ->execute();
37
38 print $ftp_info[0]->uid ."\n";
39 print $ftp_info[0]->home ."\n";
40 print $ftp_info[0]->Submitter->description ."\n";
41 print $ftp_info[0]->Submitter->identifier ."\n";
This gives me the value to describe when I didn't ask for it in the request. These two tables have a one-to-one relationship defined in their respective setUp methods.
Any hints as to what I am missing?
+1
source to share