Skip to content
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

Get collection failed when using own key #20

Open
ckng opened this issue Jan 12, 2021 · 0 comments
Open

Get collection failed when using own key #20

ckng opened this issue Jan 12, 2021 · 0 comments

Comments

@ckng
Copy link

ckng commented Jan 12, 2021

When there are more than one collection with own key, get collection fails. To reproduce:

db.collection('users')
  .add({
    id: 1,
    name: 'Bill',
    age: 47
  }, 'mykey-1')

// or use .doc(key).set():

db.collection('users')
  .doc('mykey-2')
  .set({
    id: 2,
    name: 'Paul',
    age: 34
  })
db.collection('cars')
  .doc('mykey-3')
  .add({
    id: 1,
    name: 'Honda'
  })
db.collection('users').get()
db.collection('cars').get()

Error for both

Could not get Document with Key: "mykey-3"
error @ logger.js?9ee7:27
eval @ get.js?897b:90
Promise.then (async)
getDocumentByKey @ get.js?897b:84
getDocument @ get.js?897b:104
get @ get.js?897b:114
eval @ VM2032:24
runCode @ VM1958 Index.vue:134
click @ Index.vue?ce75:125
invokeWithErrorHandling @ vue.runtime.esm.js?5593:1854
invoker @ vue.runtime.esm.js?5593:2179
invokeWithErrorHandling @ vue.runtime.esm.js?5593:1854
Vue.$emit @ vue.runtime.esm.js?5593:3888
click @ QBtn.js?9c40:154
invokeWithErrorHandling @ vue.runtime.esm.js?5593:1854
invoker @ vue.runtime.esm.js?5593:2179
original._wrapper @ vue.runtime.esm.js?5593:6917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant