[FLOW3-general] MySQL error

Thomas Layh thomas at layh.com
Mon Nov 1 08:12:23 CET 2010


I have again a small problem with MySql and FLO3. When I try to implement a
custom find-function in my repository that has as only difference an
ordering I get the following error:


#42S22: SQLSTATE[42S22]: Column not found: 1054 Unknown column
'_entity.identifier' in 'on clause' (More information)

PDOException thrown in file
Packages/Framework/FLOW3/Classes/Persistence/Backend/GenericPdo/Backend.php
in line 762.

I am pretty sure the column exists. The code I am using that is responsible
for the error looks like:

public function findLatest($count) {
        $query = $this->createQuery();
        $result = $query
                ->setLimit($count)
                ->setOrderings(array('modified' =>
\F3\FLOW3\Persistence\QueryInterface::ORDER_DESCENDING))
                ->execute();
        return $result->toArray();
    }

When I remove the setOrderings part everything works fine. I think it looks
exactly like the example in the blog example.

modified is a DateTime object.

If anyone has a good idea I would be really happy. I think this is something
really basic and I expected it to work out-of-the-box.

Greetings and thanks in advance.
Thomas Layh


More information about the FLOW3-general mailing list