0
在MySQL中,我們可以返回特定的結果就像爲:doctrine2選擇特定的列
select name,lastName from users where id=1;
如何使用doctrine2相同的請求? 我知道我們可以使用
$ query = $ this - > _ em-> createQuery('select a.name,a.lastName from ...:Users a');但我搜索了一些方法,用戶毫不a.name
爲examlpe
$query=$this->_em->createQuery('select name, lastName from ...:Users ');
是正確的?
有可能從表中返回名稱和姓氏而不帶前綴a?
非常感謝你 –