[FLOW3-general] SQL error when using setOrderings() without matching()
Peter Beernink
p.beernink at drecomm.nl
Mon Mar 15 20:13:56 CET 2010
Hi list,
For an application I am working on, I want to display all items in my
repository ordered by a specific field.
My guess was to just create a findAll() method which had the following code:
$query = $this->createQuery();
return $query->setOrderings(array('lastname' =>
\F3\FLOW3\Persistence\QueryInterface::ORDER_ASCENDING))->execute();
However when I execute this, I get an SQL error: "SQLSTATE[HY000]: General
error: 1 no such column: d.parent"
When I add a matching, it works correct, so in this case I added a match for
a required field not to be empty.
Is it a bug that I get the SQL error, or should setOrderings() alway be
combined with a matching?
I'm currently using alpha7, so if it is a bug, just let me know and I create
an issue for it.
Greetings,
Peter
More information about the FLOW3-general
mailing list