Hi everyone,
I discover that (i made a mistake) when i used createBuilder() on 1 query its working, but when i split it, it doesnt. But it gives phql true.
Working Code :
$competitors = $this->modelsManager->createBuilder()->from(array('cr' => 'Competitor'))
->columns(array(
"cr.id as id",
"cr.name as name",
"cr.last_name as last_name",
"cr.slug as slug",
"cr.social_media as social_media",
"cr.about as about",
"cr.status as crstatus"))
->orderBy('cr.name ASC')
->getQuery()
->execute()
Not working code :
$competitors = $this->modelsManager->createBuilder()->from(array('cr' => 'Competitor'))
->columns(array(
"cr.id as id",
"cr.name as name",
"cr.last_name as last_name",
"cr.slug as slug",
"cr.social_media as social_media",
"cr.about as about",
"cr.status as crstatus"));
$comptetitors->orderBy('cr.name ASC')
->getQuery()
->execute()