question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem with nested serialization

See original GitHub issue

I have nested object like user.UserBalances[0].Type for serialization

module.exports = {
  attributes: ['name', 'UserBalances'],
  UserBalances: {
    ref: 'id',
    included: true,
    attributes: ['user_id', 'Type'],
    Type: {
      ref: 'id',
      included: true,
      attributes: ['title']
    }
  }

All works fine except 3 level Type.

This is expected behavior, bug or I’m doing something wrong

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bvenchakcommented, Oct 3, 2019

Probably this issue is related to #159 . I have the same issue when passing data from Objection because nested objects there are not “plain.”

1reaction
ykhcommented, Dec 1, 2017

Yes, it seems more than two levels of relationships not working properly. Is there any solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

django - DRF nested serializer issue on create - Stack Overflow
I have a User model and a phone model the phone model has a foreign key relation with the user model I read...
Read more >
Bug - Recursive Nested Serialization does not work with ...
I get an error must be a non-nullable type when using nested serialization with network variables. Expected: Nested serialization works per ...
Read more >
Django rest framework: nested serializer. | Analytics Vidhya
All we have to do is provide for them a query set of all the clients stored in the database, and point them...
Read more >
Nested Serialization - Real Python
In this lesson, I'm going to show you how to deal with related objects and nested serialization. The DRF provides ways to serialize...
Read more >
Stop Nesting Serializers and use GraphQL Instead : r/django
The issue now is that we're potentially over exposing the nested author fields: we may have one api client who is interested in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found