first actual question here.
I am working on a loopback project. I migrated from MongoDB to Firebase sucessfully. Swapped loopback mongoDB connector by the loopback firestore connector,run some POST methods, worked fine, data added to firebase.
The problem is that Firebase does not include the autogenerated document ID inside the document itself like MongoDB did.
My question is how can I add each document's ID inside the same document itself, so my old loopback queries (e.g:localhost:3000/api/test/0001/tasks) work the way they were.
Edit: I have been trying to work on the connector directly on github, that way none would face this problem again whilst fixing it for me. I found this:
create(model, data, callback) {
this.db.collection(model).add(data).then(ref => callback(null, ref.id)).catch(err => callback(err));
}
I cannot figure out a way to make it work