-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fixes: #17976 DeviceType_Count on Manufacturer #18583
base: main
Are you sure you want to change the base?
Fixes: #17976 DeviceType_Count on Manufacturer #18583
Conversation
@renatoalmeidaoliveira it would be ideal to solve this by enabling recursion through nested serializers inside |
@jeremystretch that was my first try, i.e. using |
About using Using
|
About changing
Running with this with Debug it executes the following query:
And looking at the results inside Django debug, its returning the correct results but as an attribute of So even the query returning the expected results the JSON output omits the result instead of adding it inside the Nested Object |
Fixes: #17976 DeviceType_Count on Manufacturer
get_prefetches_for_serializer
to support nested serializersRelatedObjectCountField
fields and create aPrefetch
with the correct annotation