Skip to content

Tolerate missing identifier when applySnapshot to map #2241

Discussion options

You must be logged in to vote

Hey @davetapley - thanks for the write up here. I don't think we can make this work by default with all types.map instances, because this is not always the case:

Since each object in a map only has one identifier and it is by definition the key of map object, could that be inferred?

This is only true if you are using a model type that has an identifier. But for some data, you may not use types.identifier at all, so we can't guarantee being able to infer things.

Can you share with me more about an ideal solution? What do you want the snapshots to look like instead? I am not sure if I can really picture how we would snapshot a map of objects with IDs, but not include the keys in the map o…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@davetapley
Comment options

@coolsoftwaretyler
Comment options

Answer selected by davetapley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants