1amageek / pring.ts

Cloud Firestore model framework for TypeScript - Google
https://firebase.google.com/docs/firestore/
MIT License
108 stars 7 forks source link

Error: no entity to update: app: "s~my-app" #14

Closed starhoshi closed 6 years ago

starhoshi commented 6 years ago
    const c = new Firebase.Cart()
    await c.save()
    const cSKU1 = new Firebase.CartSKU()
    await cSKU1.save() // success

    await c.cartSKUs.insert(cSKU1) // error 

保存済みの object を insert したらエラーになります。

Error

     Error: no entity to update: app: "s~my-app"
path <
  Element {
    type: "version"
    name: "1"
  }
  Element {
    type: "cart"
    name: "WKcRsQgpqQOF9i3ogfpv"
  }
  Element {
    type: "cartSKUs"
    name: "IJdkOFz8iue5ytRlyGsN"
  }
>
starhoshi commented 6 years ago

fixed it.