How can we improve Breeze.js?

Expose a method on the EntityManager to "unwrap" an entity instance (toJS).

There are a few use cases where an entity instance needs to be sent to the server to an MVC API controller (for example for async server side validation); to do this, it is necessary to obtain an unwrapped version of the instance (plain JSON) that contains no internal properties such as entityAspect and uses properties instead of observables (ko.mapping.toJS is not suitable because of the former). Also, because the client configuration allows for a different naming convention, the method should be able to translate the names back to the naming convention originally used by the server.

Such a method already exists inside the EntityManager, is called "unwrapEntities" although it is private; so the suggestion is only moving it to the public interface of the EntityManager.

More details on this suggestion can be found in http://stackoverflow.com/questions/16202485/breeze-js-how-to-transform-a-breeze-entity-to-a-plain-json-object.

202 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Tona Diaz shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

6 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base