Skip to content

Suggestion: Allow alternativeKey to be a path #43

@russellhill

Description

@russellhill

In the code here:

data: this.serializeRelationship(rOptions.type, data[relationshipKey], this.schemas[rOptions.type][schema], included, extraData),

Could this change from:

data: this.serializeRelationship(rOptions.type, data[relationshipKey], this.schemas[rOptions.type][schema], included, extraData),

to:

data: this.serializeRelationship(rOptions.type, _.get(data, relationshipKey), this.schemas[rOptions.type][schema], included, extraData),

We have a rather obscure data model where there is a relationship effectively contained under tags.users but I cannot currently specify this as an alternativeKey as a path is not allowed.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions