$records_obj = Doctrine_Query::create() ->select('cu.t_id as id') ->addSelect('(select a.t_name from CmsDictRole a where a.t_id = cu.f_dict_role) as test') ->from('CmsUser cu') ->execute();
Błąd:
Couldn't find class a
Co robię źle....biorę przykład prosto z Doctrine-Support
Operując na tabelach chce uzyskać takie coś:
SELECT ra.t_id, (SELECT ab.t_name FROM Cms_Dict_Role ab WHERE ab.t_id = ra.f_dict_role) AS test FROM Cms_User ra
Proszę o pomoc