fix(mapper): serialize nested objects - #2259
Conversation
|
This seems to be a bit problematic right now. You're introducing an infinite recursion (nested objects reference each other) and also a performance regression because you are resolving all configured mappers again for every nested object. The goal idea is good, but I'm afraid this should be a bit deeper refactor than 2 lines of change. I'll try to think of something, let's also wait for @brendt here. Edit: added a couple failing tests for clarity. |
Thanks, that makes sense. I reworked the fix so nested object serialization no longer calls the public mapper pipeline recursively. The updated approach keeps recursion inside It also avoids the performance regression from repeatedly resolving configured mappers for every nested object. The new test for unused mapper resolution now passes. I also updated |
Fixes #2258