-
-
Notifications
You must be signed in to change notification settings - Fork 963
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
Normalization group not working in nested embedded entities #277
Comments
There is no limit. The null value is probably a sign that it's an ORM related problem (the relations are probably not fetched). |
Alright, thank you. Will dig in this tomorrow. A fast try using |
Might that be the same problem as in api-platform/core#1025 and api-platform/core#1043 ? |
@blaues0cke can you try to avoid
I always though we need some kind of serializer debugger for groups, can be a headache. Would you be able to reproduce this issue on a fork of @nik-lampe it seems like your issue is related to inheritance, I don't see any here. |
@soyuka That is true for the one issue, but in api-platform/core#1043 I'm experiencing the same issues without inheritance. So I guess maybe it's not about inheritance at all... While debugging I found out, that the attributes for the entity aren't retrieved, because the propertyNameCollectionFactory receives the wrong resource class (as far as I understand it, maybe it is right, but then the logic is flawed somewhere else) |
@nik-lampe you wrote lots of different issues / comments so it's hard to track ^^. I added a comment in your pull request, but if there are 2 different problems we need to carefully test both and fix both separately!
|
@soyuka yes, while applying this framework (which I really love btw) in my project I stumbled across multiple problems and was not aware, that they might all have the same or similar root cause. It was totally confusing for me as well. Sorry, about that :) |
Thank you! I think the fastest way to figure out if my issue is related to the ones from @nik-lampe is to give the knows fixes/prs a try (api-platform/core#1046). I will do that afap. |
@blaues0cke no, the best way to figure this out is to have a behat test case with your issue (or a fork of api-platform/api-platform with your entities + groups that reproduces the issue). The PR fix is not valid. |
I agree with @soyuka maybe we should add a failing behat test in order to fix it without breaking things |
Can confirm that
as explained in api-platform/core#1071 fixes this issue/is a workaround for this. |
Thanks for the feedback @blaues0cke! |
Maybe related to api-platform/core#1100 |
I have the following entity structure:
BrandMessage
hasCampaign
has (CampaignSettings
andRunningTime
). So when I call the/api/brand-messages
api the entitiesCampaignSettings
andRunningTime
are nested in the third level. Also,CampaignSettings
andRunningTime
are embedded entities.When I call the
/api/campaigns
api, everything works as expected.runningTime
andsettings
are present:But when I call the
/api/brand-messages
api, these properties (runningTime
andsettings
) are justnull
:I double checked all the serialisation groups and they even work in the third nesting level for
title
anddescription
. Is there a default nesting limit for nested properties or something like that? Or am I facing a bug? :-)The text was updated successfully, but these errors were encountered: