问题
I'm just getting started with Breeze. I'm not using .Net. I've used the edmunds example to GET data, but now I'm trying to POST data.
I've tried using manager.saveChanges() which posts a collection of changes to a "SaveChanges" URL. While this is awesome, I'd prefer to have the option of sending the changes individually to RESTful URLS (ie, updating a todo would POST to todo/:id).
Is there any way to configure Breeze to do this?
Failing that, is the "SaveChanges" URL customizable?
回答1:
We are working on exactly that, but it isn't available yet. Soon...
What you can do right now, is change the server endpoint for 'SaveChanges' via the SaveOptions.resourceName property. (See the EntityManager.SaveChanges api for more info). You can also intercept the SaveChanges call on the server. ( See Save interception in the Breeze Documentation).
来源:https://stackoverflow.com/questions/16796102/save-changes-to-restful-urls-with-breeze-js