Support for deeper API paths
Support for deeper API paths

For the API of my current project I extended the DoctrineResource.php with the changes in this pull request. We have deeper API paths, as example:

/cars/[/:carId]
/cars/:carId/parts[/:parts]

If you fetch a certain car part with /cars/1/parts/300, the current code will give the correct car part with id 300. But /cars/2/parts/300 will also give you that part 300. But part 300 does not belong to car 2.

The code in this pull request checks if the name of the route params matches entity fields and adds them as criteria.

I also added support for composite ids in this part. I used a double underscore as delimiter, and specified values must be in the same order as the properties defined in the Doctrine entity.

kusmierz/zf-apigility-doctrine,kusmierz/zf-apigility-doctrine,TomHAnderson/zf-doctrine-querybuilder,TomHAnderson/zf-doctrine-querybuilder