Closed marcfallows closed 10 years ago
We didn't need to in our project because as soon as you did formObject.save() we threw the object away and let the socket event spin up an equivalent instance in cache that was properly wired into the event system.
However you do have a point that you need the query stream to even call .save()
You could instead of injecting the class inject the parent object and create a new method called appObject.newProject(initData) or something. This may be a better approach anyway.
Would we be expecting to pass the AppObject's upStream/downStream in the constructor here: https://github.com/ProLoser/AngularJS-ORM/blob/master/modules/Project/Project.coffee#L20
I would expect this to be:
But then, I'm not sure how that would work further down the chain (say, a separate route for a new task form). How would you have the right project instance to get the upStream/downStream?