-
Notifications
You must be signed in to change notification settings - Fork 49
createEntityFromMetadata not use entityExtractor result #143
Comments
A HalEntity is not a $object which may also be an entity. The HalEntity is a wrapper around the entity. |
Thank you @TomHAnderson. Yes HalEntity is a wrapper, but I think it should wrap $data and not $object, otherwise almost all operations behind this call: |
The EntityExtractor has a cache ( This issue is actually a duplicate, I was also wondering about the exact same thing in this issue: #64 This issue is from october 2014 so some variable names changed but the question is about the same issue. @weierophinney answered as follows:
Hope this helps. |
This repository has been closed and moved to laminas-api-tools/api-tools-hal; a new issue has been opened at laminas-api-tools/api-tools-hal#9. |
Using Apigility, I configured a service with Reflection Hydrator (in my case a custom hydrator which transforms the array properties keys into camel-case).
The problem is that every elaboration on the object made by the hydrator are unused: I notice in ResourceFactory.php there is:
where $object is the original object.
If I pass $data to the Entity constructor, as I expected, everything works.
Did I misunderstand the meaning of this lines?
The text was updated successfully, but these errors were encountered: