I have a service, doctrine related, completely created by Apigility, with no modifications what so ever. The code was never modified, it works just as Apigility created it.
When requesting a collection: myapi.local/path
{
"count": 25,
"total": 13562,
"collectionTotal": 13562,
"_links":
{ ... more stuff here
},
"_embedded":
{
"path":
[
{
"pathid": 1,
"dev": 51729,
"inode": "2",
"path": "/disk1",
"online": true,
"fileid": "0",
"_links":
{
"self":
{
"href": "http://imageadministration.local/path/1"
}
}
},
... and so on
When requesting that very same entity myapi.local/path/1:
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Not Found",
"status": 404,
"detail": "Entity was not found"
}
Response headers:
Status Code: 404 Not Found
Access-Control-Allow-Headers: Authorization, Origin, Content-Type, Accept
Access-Control-Allow-Methods: PUT, GET, POST, PATCH, DELETE
Connection: Keep-Alive
Content-Type: application/problem+json
Date: Fri, 08 Apr 2016 08:40:35 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.10 (Debian)
Transfer-Encoding: chunked
X-Powered-By: PHP/5.6.17
access-control-allow-origin: *
Debuging the code step by step, I could find a "No result was found for query although at least one row was expected". This message is inside a Doctrine object and never gets back to the user. No PHP erros, no exceptions, nothing. Indeed, the registry can be found in the DB with a simple select.
The error message itself is explained in other posts, but since this service is 100% created by Apigility and the exception ocurs inside the Doctrine module and there is not a single line of code of my own, I don´t even know where to start. Entity has no relations and it was automatically created by Doctrine via orm-module.
Any direction will be much appreciated, czr.