{"action":"created","issue":{"url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/45","repository_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore","labels_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/45/comments","events_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/45/events","html_url":"https://github.com/mesqueeb/vuex-easy-firestore/issues/45","id":363966118,"node_id":"MDU6SXNzdWUzNjM5NjYxMTg=","number":45,"title":"Get Doc but id always equals null","user":{"login":"adamelevate","id":1000025,"node_id":"MDQ6VXNlcjEwMDAwMjU=","avatar_url":"https://avatars0.githubusercontent.com/u/1000025?v=4","gravatar_id":"","url":"https://api.github.com/users/adamelevate","html_url":"https://github.com/adamelevate","followers_url":"https://api.github.com/users/adamelevate/followers","following_url":"https://api.github.com/users/adamelevate/following{/other_user}","gists_url":"https://api.github.com/users/adamelevate/gists{/gist_id}","starred_url":"https://api.github.com/users/adamelevate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamelevate/subscriptions","organizations_url":"https://api.github.com/users/adamelevate/orgs","repos_url":"https://api.github.com/users/adamelevate/repos","events_url":"https://api.github.com/users/adamelevate/events{/privacy}","received_events_url":"https://api.github.com/users/adamelevate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-09-26T10:43:54Z","updated_at":"2018-10-02T07:01:41Z","closed_at":null,"author_association":"NONE","body":"When I call collections, the id comes back correctly for each item, but when calling a single document the id always is null... \r\n\r\n## store.js \r\n```javascript\r\n\r\nconst locksData = {\r\n  firestorePath: 'locks/',\r\n  firestoreRefType: 'collection', // collection or 'doc'\r\n  moduleName: 'locksData',\r\n  statePropName: 'data',\r\n  sync:{\r\n    where:[['cId', '==', '{customerId}']]\r\n  }\r\n}\r\n\r\nconst lockData = {\r\n  firestorePath: 'locks/{lockId}/',\r\n  firestoreRefType: 'doc', // collection or 'doc'\r\n  moduleName: 'lockData',\r\n  statePropName: 'data',\r\n}\r\n```\r\n## component.js\r\n```javascript\r\nthis.$store.dispatch('lockData/openDBChannel', {lockId: this.$route.params.lockId})\r\n      .then(console.log)\r\n      .catch(console.error)\r\n```\r\n### collection results\r\n![image](https://user-images.githubusercontent.com/1000025/46075105-0fecf500-c1bc-11e8-9248-5c29c64de2dc.png)\r\n\r\n## single doc result\r\n![image](https://user-images.githubusercontent.com/1000025/46075003-c3091e80-c1bb-11e8-86cc-7449771cc1e4.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/comments/426169796","html_url":"https://github.com/mesqueeb/vuex-easy-firestore/issues/45#issuecomment-426169796","issue_url":"https://api.github.com/repos/mesqueeb/vuex-easy-firestore/issues/45","id":426169796,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjE2OTc5Ng==","user":{"login":"adamelevate","id":1000025,"node_id":"MDQ6VXNlcjEwMDAwMjU=","avatar_url":"https://avatars0.githubusercontent.com/u/1000025?v=4","gravatar_id":"","url":"https://api.github.com/users/adamelevate","html_url":"https://github.com/adamelevate","followers_url":"https://api.github.com/users/adamelevate/followers","following_url":"https://api.github.com/users/adamelevate/following{/other_user}","gists_url":"https://api.github.com/users/adamelevate/gists{/gist_id}","starred_url":"https://api.github.com/users/adamelevate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamelevate/subscriptions","organizations_url":"https://api.github.com/users/adamelevate/orgs","repos_url":"https://api.github.com/users/adamelevate/repos","events_url":"https://api.github.com/users/adamelevate/events{/privacy}","received_events_url":"https://api.github.com/users/adamelevate/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T07:01:41Z","updated_at":"2018-10-02T07:01:41Z","author_association":"NONE","body":"Dude, you are going above and beyond to help me, I super appreciate it.\r\n\r\nMy database has locks, keys, and bunches of other stuffs. Each customer will have Thousands of locks and Thousands of keys, nature of the business.\r\n\r\nThere likely won't be many undelivered keys at any given point but there could be 50-100, I already have an index for that \"delivered = false\". That's where I'm opening my dbchannel, but once a user get's to a single lock page, I really need to make sure I have all the keys, \"delivered true & false\" for that single lock. \r\n\r\nMy idea was to go with Option A, since I don't want to call thousands of keys that will never be seen. I need my db to be flat since many people at a customer will need to see the keys and subcollections aren't great for that, also have cloud functions that run to check for unused \"key codes\" to attach to keys after creation with other little helper functions.\r\n\r\n## Lock page method \"getKeys()\"\r\n```javascript\r\nthis.$store.dispatch('keysData/fetch', \r\n{whereFilters: [['lockId', '==', this.lockId],['cId', '==', this.user.cId]], orderBy: ['active_date']})\r\n       .then(querySnapshot => {\r\n         if (querySnapshot.done === true) {\r\n           // console.log('querySnapshot',querySnapshot);\r\n           vThis.isloadingKeys = false;\r\n           vThis.loadKeys(querySnapshot);\r\n           return 'all docs retrieved'\r\n         }\r\n       })\r\n       .catch(console.error)\r\n```\r\nIt worked once, asking me to make an index, which I did, then never worked again."}}
{"actor":{"display_login":"adamelevate"}}