Hallo zusammen Ich versuche eine Doctrine Query auf die Configurator Groups auszuführen erhalte aber folgende Fehlermeldung welche ich nicht wirklich verstehe. Eventuell kann mir hier jemand weiterhelfen was fehlt oder ich übersehen habe Error: “message”:“Errormesage: [Syntax Error] line 0, col 7: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | “(” Subselect “)” | CaseExpression, got ‘Group’” } Query schaut so aus: public function getRepository() { return $this-\>getManager()-\>getRepository('Shopware\Models\Article\Configurator\Group'); } public function getList($offset = 0, $limit = 25, array $criteria = array(), array $orderBy = array()) { $builder = $this-\>getRepository()-\>createQueryBuilder("Group"); ... $query = $builder-\>getQuery(); $query-\>setHydrationMode($this-\>getResultMode()); $paginator = new \Doctrine\ORM\Tools\Pagination\Paginator($query); //returns the total count of the query $totalResult = $paginator-\>count(); --\> HERE the error gets produced ... }
Merci für Hinweise. Gruss Mark
“Group” ist ein reserviertes Wort. Hier musst du einen Alias nutzen. Viele Grüße
1 „Gefällt mir“
Danke das wars…da hatte ich wohl Tomaten auf den Augen. Merci