Skip to content

feat(populate): populated items update when changed in database #69

Open
@DeividasK

Description

@DeividasK

Original data:

goals: {
  goalId1: {
    uid: 'userId',
    partner: 'userId2'
  }
}
users: {
  userId: {
    displayName: 'John Smith'
  },
  userId2: {
    displayName: 'Jim Rogers'
  }
}

Data after population:

goals: {
  goalId1: {
    uid: {
      displayName: 'John Smith'
    },
    partner: {
      displayName: 'Jim Rogers'
    }
  }
}

I have noticed that after updating the original users.userId.displayName to Batman, the populated item did not update, i.e. goals.goalId1.uid.displayName remained John Smith. I think this is a good default behaviour, but it took me sometime to figure this one out. Maybe this should be mentioned somewhere in the docs?

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions