-
Notifications
You must be signed in to change notification settings - Fork 142
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
Firestore collection (mixin) items don't have the $key field (used in dom-repeat) #306
Comments
I’m actually considering making a PR to change |
I'm fine with both, as long as it is shown and documented. In Firestore it seems to me that both are beeing used (I think ID is more often used, but NAME is used in security rules on resources..): |
Since we use it as a latter, I'd prefer the That would be great to have some feedback from the maintainers :) @tjmonsi @mbleigh |
__name__ refers to a fully qualified path including collections, __id__ to
the document id. We should keep __id__.
…On Mon, Jan 8, 2018, 2:41 AM Natan Sągol ***@***.***> wrote:
id is used as a property on snapshots, while __name__ is used when it
refers to a property of an entity itself, in security rules as you've
mentioned, but also for ordering etc.
Since we use it as a latter, I'd prefer the __name__.
That would be great to have some feedback from the maintainers :) @tjmonsi
<https://github.com/tjmonsi> @mbleigh <https://github.com/mbleigh>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#306 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAD_kKOvsvAozeXCSMd6o2MzZHUGqreks5tIfDogaJpZM4QXBM4>
.
|
Ok, good to know. |
Sorry guys, just wondering where this firestore mixin is ? I see questions posted about it and discussions but cannot find it in the repo! Cheers |
https://github.com/firebase/polymerfire/tree/firestore It's not in the master yet. |
Description
The old database and firebase-query added an extra
$key
field to every item.But the new firestore collection (mixin) does not, but instead uses
__id__
.Expected outcome
Either keep it the same in both DBs or point out that
__id__
can be used, the same way$key
is described:https://www.webcomponents.org/element/firebase/polymerfire/elements/firebase-query
Actual outcome
For now,
__id__
has to be used instead of$key
(which is fine for me, just need to know).The text was updated successfully, but these errors were encountered: