Skip to content

Break js-data relations when JsonApi related data changes or becomes Null or Empty #10

Open
@BlairAllegroTech

Description

@BlairAllegroTech

js-data maintains data relationships.

If however other changes are being made against the server and we then request a resource that subsequently returns relationship data that differs from the js-data data store, we should try to update the datastore to keep it in sync?

Should we try to do this or leave to the developer to keep things in sync ??
See also #9

Cases:

  • We request a to one related field and it returns null (from the server).
    • Clear the local key on the parent object
  • We request a toMany relationship that returns an empty array
    • Clear all foreign keys on foreign objects

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions