-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DATA] Identifiers #403
[DATA] Identifiers #403
Conversation
@runspired Looking at the WIP tag, is it alright for us - @emberjs/the-ember-times-editors - to feature this already in next week's newsletter? |
@jessica-jordan still too many rough edges, but I think we'll be in good shape by late Wednesday/Thursday for featuring it next week. |
I know I'm pretty late to the party here, but are we sure we don't want to take the opportunity to generalize away from string-only ids? Sometimes it is useful to use compound identifiers. I'm actually using them in an (experimental, without ED) app right now - Although these can be serialized to/from strings, it places restrictions on the individual sub-keys (no colons, or must remain a fixed length, etc). Maybe the cost is too great (need to define an equality protocol, makes maps/caches/lookups harder & more expensive, etc), but I'd love to hear any thoughts on the subject. |
Compound identifiers still need to be serializable and (more importantly) would not provide a path for resolving a large number of the edge cases this RFC tackles (mainly around polymorphism, alternate indexes, new record creation, and race conditions during save). Moreover (and not to nitpick, but I feel this is important) in the example compound key you gave (
I feel just the opposite is true here. First: we don't attach an arbitrary length to the Second: While you could attempt to parse your compound properties out of the
It would most definitely make a lot of costs greater, lookups harder, equality checks difficult. More importantly it would make serializing the state of things unnecessarily difficult. Consider the case where the compound key used to generate the |
Very excited about this! As someone who has followed the |
fd71f0a
to
c71bb98
Compare
At our meeting yesterday we voted to merge this RFC. Having squashed the commits and renamed the file with the RFC # and updated the appropriate links, I am now merging :) |
Rendered