I am converting .NET to PHP and still have a good time with the transition. I use doctrine 1.2 as my ORM and work with my models, and everything is perfectly connected. However, the problem that I am considering now is that the output objects are huge. I have a pretty simple table called USERS - it probably has 8 columns and FK for 4 or 5 other tables. I use the following code to hydrate my USERS object:
$q = Doctrine_Query::create()
->select('u.*')
->from('USERS u')
->where('u.VANITY_URL = ?',$Url_Frag);
$users = $q->execute();
print_r($users);
I see an object hydrated with my data, so that's good. However, this is also due to the fact that it looks like a bunch of metadata, which I obviously do not need. In general, the object has a length of more than 5000 lines! I am sure that there is some obvious switch that basically says "only emit such and such data", but I cannot find it in the manual of the doctrine.
Thoughts?
source
share