angularjs - Breezejs - why don't changes to non-scalar or complex data properties trigger change events? -
i'm using non-scalar , complex data properties in breeze. work fine, except entitychanged , propertychanged events aren't triggered when items added or removed non-scalar property, or when properties changed on complex property.
how can notified when non-scalar or complex properties change?
manager.metadatastore.addentitytype({ shortname: 'thing', namespace: namespace, dataproperties: { id: { datatype: breeze.datatype.guid, ispartofkey: true }, strings: { datatype: breeze.datatype.string, isscalar: false }, object: { datatype: new breeze.complextype({ shortname: 'object', namespace: namespace, dataproperties: { a: { datatype: breeze.datatype.string }, b: { datatype: breeze.datatype.string } } }) } } });
changes instances of scalar data properties (i.e. primitives , complextype's) raise change events on parent entity. changes nonscalar data properties raise "arraychanged" event on associated collection. see:
http://www.breezejs.com/sites/all/apidocs/classes/%e2%86%88_complexarray_.html
and
http://www.breezejs.com/sites/all/apidocs/classes/%e2%86%88_primitivearray_.html#event_arraychanged
Comments
Post a Comment