Include data key when lazy-loaded relationships are included - #10
Conversation
| end | ||
|
|
||
| def record_hash(record, fieldset, params = {}) | ||
| def record_hash(record, fieldset, includes_list, params = {}) |
There was a problem hiding this comment.
If includes_list doesn't have a default value here, it could be a breaking change.
| end | ||
|
|
||
| def serialize(record, serialization_params, output_hash) | ||
| def serialize(record, included, serialization_params, output_hash) |
There was a problem hiding this comment.
This seems like a breaking change. New parameters should generally be appended to the list and included a default.
|
@kpheasey I've looked into the possible breaking change issues with the method params on @dpikt Can you look into the conflict in the spec. Thanks. |
Resolves Netflix/fast_jsonapi#357
When a relationship is listed under
include:, it will add the data key to the record hash, allowing the included relationships to be reconstructed.