-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createEntityFromMetadata not use entityExtractor result #9
Comments
A HalEntity is not a $object which may also be an entity. The HalEntity is a wrapper around the entity. Originally posted by @TomHAnderson at zfcampus/zf-hal#143 (comment) |
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: Originally posted by @DanielBertocci at zfcampus/zf-hal#143 (comment) |
The EntityExtractor has a cache ( This issue is actually a duplicate, I was also wondering about the exact same thing in this issue: zfcampus/zf-hal#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. Originally posted by @Wilt at zfcampus/zf-hal#143 (comment) |
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?
Originally posted by @DanielBertocci at zfcampus/zf-hal#143
The text was updated successfully, but these errors were encountered: