alekseykulikov / backbone-offline

[Deprecated] Allows your Backbone.js app to work offline
MIT License
720 stars 56 forks source link

Need help with updating related keys in multiple collections #59

Open t3living opened 11 years ago

t3living commented 11 years ago

I have 3 collections

  1. drivers (id, name, address, etc)
  2. facility (id, name, address, etc)
  3. delivery (id, driver_id, facility_id, date, etc)

if offline (a) I add a new driver..bb-offline creates a local_id and sid:'new' (b) then create a new delivery using the driver created in (a)...the delivery.driver_id field will have the driver.local_id value

How do I insure that on sync the driver is updated first...and then the delivery.driver_id is updated with the driver.sid value once assigned?