i have loop in first create 1 objects , next object uses id previous inserted object.
the problem seems it's not finished inserting previous object before started next insertion, last insertion doesn't id previous insertion.
i guess it's meteor creating things concurrently instead of stop waiting other operations finish before moving on.
how can make sure previous insertion finished before moving on?
are on server or client? server if don't provide callback methods should run synchronized, client must provide callback , should id in callback returned data. if need have them synced can use meteor's wrapasync method, more info here: http://docs.meteor.com/#/full/meteor_wrapasync
Comments
Post a Comment