The problem with this implementation is that the querybuilder only works
for ORM. I will also be needing it with doctrine ODM. Maybe it is a good
kdea to create an abstractRepository & interface for ODM and ORM. In this
repository a findAllRestItems method is implemented with the logics per
type of doctrine module. Maybe the paginator can still be used, but we need
to include it into the module, because there is no ODM paginator.

Or what is your oppion on ODM integration?
Op 28-nov.-2013 06:47 schreef "Tom Anderson" <notifications@github.com>:

> In src/SoliantConsulting/Apigility/Server/Resource/DoctrineResource.php:
>
> > +        $orderBy = array();
> > +        if (isset($parameters['_orderBy'])) {
> > +            foreach($parameters['_orderBy'] as $fieldName => $sort) {
> > +                $orderBy[$fieldName] = $sort;
> > +            }
> > +        }
> > +
> > +        // Filters
> > +        $criteria = array();
> > +        if (isset($parameters['_query'])) {
> > +            foreach ($parameters['_query'] as $fieldName => $filter) {
> > +                $criteria[$fieldName] = $filter;
> > +            }
> > +        }
> > +
> > +        // Run query
>
> Regarding findBy, this code has been corrected to a query in a collection
> class
>
> https://github.com/TomHAnderson/soliantconsulting-apigility/blob/master/src/SoliantConsulting/Apigility/Server/Resource/AbstractResource.php#L258
>
> inherited from a new abstract in a paginator in a HAL collection. All this
> allows for pagination links.
>
>
> https://github.com/TomHAnderson/soliantconsulting-apigility/blob/master/src/SoliantConsulting/Apigility/Server/Collection/AbstractCollection.php
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/soliantconsulting/soliantconsulting-apigility/pull/5/files#r7977413>
> .
>