You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What if I want to embed a resource which is not part of a collection, but a single resource without an Id.
For example users/:user_id/address
I do not need an identifier because the user has only one id. An id is not necessary.
When I instantiate HalResource i can do this new HalResource(array, false); Which works totally fine. But the MetaMap doesn't allow me to define a resource map without defining an identifier_name. If i put false or null the HalLinks.php triggers an Exception\RuntimeException saying "Unable to determine identifier for object". I think it should be possible to define single resources without a parent collection and an id. This is conform RESTful definitions.
I also don't manage mapping routes without an id to the right actions in the controller. This has to do with the extension of the zf2 AbstractRestfulController. That is where routes without ids are mapped to the collection actions (getList, updateList, etc).
To allow support of singleton resources in PhlyRestfully seems to be complicated. But it would be great if it would be supported in the future.
The text was updated successfully, but these errors were encountered:
What if I want to embed a resource which is not part of a collection, but a single resource without an Id.
For example
users/:user_id/address
I do not need an identifier because the user has only one id. An id is not necessary.
When I instantiate HalResource i can do this
new HalResource(array, false);
Which works totally fine. But the MetaMap doesn't allow me to define a resource map without defining anidentifier_name
. If i putfalse
ornull
theHalLinks.php
triggers anException\RuntimeException
saying "Unable to determine identifier for object". I think it should be possible to define single resources without a parent collection and an id. This is conform RESTful definitions.I also don't manage mapping routes without an id to the right actions in the controller. This has to do with the extension of the zf2 AbstractRestfulController. That is where routes without ids are mapped to the collection actions (getList, updateList, etc).
To allow support of singleton resources in PhlyRestfully seems to be complicated. But it would be great if it would be supported in the future.
The text was updated successfully, but these errors were encountered: