0

I am able to have breeze capture server computed properties using this code, gotten from HERE.

var yourTypeCtor = function () {
      this.calculatedProperty = ""; 
};

store.registerEntityTypeCtor("YourType", yourTypeCtor);

I have a computed property that returns an entity object. The entity type returned is part of the metadata. However, breeze returns this entity as an object, not an observable. Is it possible to configure breeze to return this object as an observable so that the object is updated based on the conditions of the computed properties that are defined on the server side?

Community
  • 1
  • 1
jpo
  • 3,959
  • 20
  • 59
  • 102
  • You have entity A that has a navigation property to entity of type B, and B contains computed properties, and when A is saved, a new instance of B is created on the server and returned to the client? – Steve Schmitt Oct 22 '15 at 21:44
  • You are right, but is it possible to have it update before saving, just like an observable will do? Also, breeze does not even recognnise the computed property to be an emtity type – jpo Oct 23 '15 at 12:22
  • Why can't you use a regular navigation property for this? Declare the relationship between A and B in the metadata. – Steve Schmitt Oct 23 '15 at 17:26

0 Answers0