You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>If this is your first time browsing the API, you might want to start with the <ahref="/api-docs/classes/entitymanager.html">EntityManager</a> as this is the core class in Breeze.</p>
77
+
<p>If this is your first time browsing the API, you might want to start with the <ahref="/doc-js/api-docs/classes/entitymanager.html">EntityManager</a> as this is the core class in Breeze.</p>
78
78
<p><ahref="http://breeze.github.io/doc-samples/">Sample applications</a>, <ahref="http://www.youtube.com/playlist?list=PL88C2B43249433416&feature=plcp" target="_blank">videos</a>, and <ahref="http://breeze.github.io/doc-js">additional documentation</a> are also available.</p>
Copy file name to clipboardExpand all lines: doc-js/complex-properties.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ Complex types in Breeze are much like entity type's but with some key difference
20
20
21
21
Every instance of a complex type object has two properties automatically added by Breeze:
22
22
23
-
- A <ahref="/doc-js/api-docs/classes/ComplexType.html"target="_blank">complexType </a>property - This is the type metadata for the specific complex type that describes this object. A `complexType` property is analogous to the `entityType` property on Breeze entities.
23
+
- A <ahref="/doc-js/api-docs/classes/complextype.html"target="_blank">complexType </a>property - This is the type metadata for the specific complex type that describes this object. A `complexType` property is analogous to the `entityType` property on Breeze entities.
24
24
25
-
- A <ahref="/doc-js/api-docs/classes/ComplexAspect.html"target="_blank">complexAspect </a>property - This contains information about the 'parentage' of this instance and any original values for change tracking purposes. The `complexAspect` is analogous to the `entityAspect` property on every Breeze entities.
25
+
- A <ahref="/doc-js/api-docs/classes/complexaspect.html"target="_blank">complexAspect </a>property - This contains information about the 'parentage' of this instance and any original values for change tracking purposes. The `complexAspect` is analogous to the `entityAspect` property on every Breeze entities.
Copy file name to clipboardExpand all lines: doc-js/date-and-time.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Remember, though, that Breeze on the client serializes per ISO 8601 and there is
17
17
18
18
## New entity *DateTime* values
19
19
20
-
The metadata determine how Breeze initializes the *DateTime* property of a newly-created entity. The property will be *null* if the property is nullable. If the property is not nullable (i.e., required), Breeze sets it to the constant value in <ahref="/doc-js/api-docs/classes/DataType.html#property_DateTime"target="_blank">`breeze.DataType.DateTime.defaultValue`</a>. That default is "January 1, 1900". You can change this value for your application as long as you do so *before* fetching or setting metadata.
20
+
The metadata determine how Breeze initializes the *DateTime* property of a newly-created entity. The property will be *null* if the property is nullable. If the property is not nullable (i.e., required), Breeze sets it to the constant value in <ahref="/doc-js/api-docs/classes/datatype.html#datetime"target="_blank">`breeze.DataType.DateTime.defaultValue`</a>. That default is "January 1, 1900". You can change this value for your application as long as you do so *before* fetching or setting metadata.
Copy file name to clipboardExpand all lines: doc-js/entity-serialization.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Your custom ***unmapped*** properties present a greater challenge. Breeze serial
36
36
37
37
You can set an optional `serializerFn` property of the `MetadataStore` and `EntityType` classes with your own serialization function. Breeze calls your function first when serializing entity property values. Then Breeze applies its own serialization to your function's return values, applying the techniques discussed previously.
38
38
39
-
The `serializerFn` has two parameters: the <ahref="/doc-js/api-docs/classes/DataProperty.html"title="DataProperty API"target="_blank">`DataProperty`</a> to serialize and the object's current value for that property. If the `serializerFn` returns `undefined`, the serialization of that property is suppressed.
39
+
The `serializerFn` has two parameters: the <ahref="/doc-js/api-docs/classes/dataproperty.html"title="DataProperty API"target="_blank">`DataProperty`</a> to serialize and the object's current value for that property. If the `serializerFn` returns `undefined`, the serialization of that property is suppressed.
40
40
41
41
Use *MetadataStore.setProperties* and *EntityType.setProperties* methods to set the `serializerFn` property.
Copy file name to clipboardExpand all lines: doc-js/entitymanager-and-caching.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ When you eventually ask the *EntityManager* to save, it finds the changed entiti
23
23
24
24
## Key EntityManager capabilities
25
25
26
-
The following is a summary of the methods available on the EntityManager arranged by task. For a complete list of methods, please see the <ahref="/doc-js/api-docs/classes/EntityManager.html">EntityManager API documentation</a>.
26
+
The following is a summary of the methods available on the EntityManager arranged by task. For a complete list of methods, please see the <ahref="/doc-js/api-docs/classes/entitymanager.html">EntityManager API documentation</a>.
Copy file name to clipboardExpand all lines: doc-js/extending-entities.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Breeze entities are created by calling the `EntityManager.createEntity` method o
14
14
15
15
var cust = manager.createEntity('Customer');
16
16
17
-
Internally that method first acquires an <ahref="/doc-js/api-docs/classes/EntityType.html"target="_blank">EntityType</a> information object from a <ahref="/doc-js/api-docs/classes/MetadataStore.html"target="_blank">MetadataStore</a> and then calls the type's `createEntity` method [<ahref="#Note01">1</a>], e.g.,
17
+
Internally that method first acquires an <ahref="/doc-js/api-docs/classes/entitytype.html"target="_blank">EntityType</a> information object from a <ahref="/doc-js/api-docs/classes/metadatastore.html"target="_blank">MetadataStore</a> and then calls the type's `createEntity` method [<ahref="#Note01">1</a>], e.g.,
18
18
19
19
// assume that manager's metadata was previously fetched from the server
20
20
var store = manager.metadataStore;
@@ -64,7 +64,7 @@ It isn't *just* a mess. It feels wrong. The `isBeingEdited` property should be p
64
64
65
65
# Extend the Type
66
66
67
-
We'll extend the `Customer` definition by adding information to the `Customer`'s <ahref="/doc-js/api-docs/classes/EntityType.html"target="_blank">*EntityType*</a> in the client-side `MetadataStore`. We'll do this early in the application, before it makes a single call to the backend service.
67
+
We'll extend the `Customer` definition by adding information to the `Customer`'s <ahref="/doc-js/api-docs/classes/entitytype.html"target="_blank">*EntityType*</a> in the client-side `MetadataStore`. We'll do this early in the application, before it makes a single call to the backend service.
68
68
69
69
We can get a `MetadataStore` from an `EntityManager` instance [<ahref="#Note02">2</a>] like so:
Copy file name to clipboardExpand all lines: doc-js/inside-entity.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ The "Customer" is also an **entity**, a long-lived object with a permanent key.
16
16
17
17
# EntityType
18
18
19
-
Every Breeze entity instance has an `entityType` property that returns an [`EntityType`](/doc-js/api-docs/classes/EntityType.html) object which is the [metadata](/doc-js/metadata.html) that describe its properties and other facts about the type.
19
+
Every Breeze entity instance has an `entityType` property that returns an [`EntityType`](/doc-js/api-docs/classes/entitytype.html) object which is the [metadata](/doc-js/metadata.html) that describe its properties and other facts about the type.
20
20
21
21
var type = someCustomer.entityType;
22
22
23
23
# <aname="entityaspect"></a>EntityAspect
24
24
25
-
A Breeze entity is "self-tracking". It maintains its own entity state, and the means to change that state, in the ***<ahref="/doc-js/api-docs/classes/EntityAspect.html"target="_blank"title="EntityAspect API">EntityAspect</a>*** object returned by its *entityAspect* property.
25
+
A Breeze entity is "self-tracking". It maintains its own entity state, and the means to change that state, in the ***<ahref="/doc-js/api-docs/classes/entityaspect.html"target="_blank"title="EntityAspect API">EntityAspect</a>*** object returned by its *entityAspect* property.
26
26
27
27
An object becomes a Breeze entity when it acquires its `EntityAspect` which it does when it
28
28
@@ -44,7 +44,7 @@ We'll tackle the key features of `EntityAspect` in four groups.
44
44
45
45
Is the entity attached to an `EntityManager` and therefore in its cache? Has it changed? If changed, is it a new entity, a modified version of an existing entity from remote storage, or an existing entity that is marked for deletion?
46
46
47
-
The `entityState` property answers these questions with a value from the <ahref="">[`EntityState`](/doc-js/api-docs/classes/EntityState.html) enumeration. Here are the enumeration names and their meanings:
47
+
The `entityState` property answers these questions with a value from the <ahref="">[`EntityState`](/doc-js/api-docs/classes/entitystate.html) enumeration. Here are the enumeration names and their meanings:
48
48
49
49
| EntityState | Description
50
50
| ----------- | -----------
@@ -210,13 +210,13 @@ Breeze typically raises *propertyChanged* for each property individually. Some o
210
210
211
211
Breeze properties aren't just observable. They can validate changes based on rules registered in metadata. Some of the validations are registered automatically based on information in the metadata. For example, a key property is automatically required. You can add your own custom validations as well. See the <ahref="/doc-js/validation"target="_blank">Validation topic</a> for details.
212
212
213
-
In brief, Breeze evaluates validation rules at prescribed times. It can also validate on demand. Call the *entityAspect.validateEntity* to validate the entire entity which means every property validation rule as well as every entity-level validation rule. You can validate a single property (all of its rules) by calling *entityAspect.<ahref="/doc-js/api-docs/classes/EntityAspect.html#method_validateProperty"target="_blank">validateProperty</a>*, passing in the name of the property and an optional context. Again, see the <ahref="/doc-js/validation"target="_blank">Validation topic</a> for details.
213
+
In brief, Breeze evaluates validation rules at prescribed times. It can also validate on demand. Call the *entityAspect.validateEntity* to validate the entire entity which means every property validation rule as well as every entity-level validation rule. You can validate a single property (all of its rules) by calling *entityAspect.<ahref="/doc-js/api-docs/classes/entityaspect.html#validateproperty"target="_blank">validateProperty</a>*, passing in the name of the property and an optional context. Again, see the <ahref="/doc-js/validation"target="_blank">Validation topic</a> for details.
214
214
215
-
A validation rule either passes or fails. If it passes, it returns null. If it fails, it returns a *<ahref="/doc-js/api-docs/classes/ValidationError.html"target="_blank">ValidationError</a>* describing the problem.
215
+
A validation rule either passes or fails. If it passes, it returns null. If it fails, it returns a *<ahref="/doc-js/api-docs/classes/validationerror.html"target="_blank">ValidationError</a>* describing the problem.
216
216
217
217
Every `EntityAspect` maintains a `validationErrorsCollection`. The Breeze validation engine adds a new `ValidationError` instance to that collection when a validation rules fails and removes an old `ValidationErrors` instance when its associated validation rule passes.
218
218
219
-
You can't access the inner `validationErrorsCollection` directly. You can get a copy of its contents by calling *entityAspect*.*<ahref="/doc-js/api-docs/classes/EntityAspect.html#method_getValidationErrors"target="_blank">getValidationErrors</a>*. You can also add to or remove *validationError*s from the `validationErrorsCollection` programmatically with the `EntityAspect` methods, *<ahref="/doc-js/api-docs/classes/EntityAspect.html#method_addValidationError"target="_blank">addValidationError</a>* and *<ahref="/doc-js/api-docs/classes/EntityAspect.html#method_removeValidationError"target="_blank">removeValidationError</a>*.
219
+
You can't access the inner `validationErrorsCollection` directly. You can get a copy of its contents by calling *entityAspect*.*<ahref="/doc-js/api-docs/classes/entityaspect.html#getvalidationerrors"target="_blank">getValidationErrors</a>*. You can also add to or remove *validationError*s from the `validationErrorsCollection` programmatically with the `EntityAspect` methods, *<ahref="/doc-js/api-docs/classes/entityaspect.html#addvalidationError"target="_blank">addValidationError</a>* and *<ahref="/doc-js/api-docs/classes/entityaspect.html#removevalidationerror"target="_blank">removeValidationError</a>*.
220
220
221
221
Breeze raises the `EntityAspect.validationErrorsChanged` event when `ValidationErrors` are added or removed from the entity's `validationErrorsCollection`; you can subscribe to that event:
222
222
@@ -233,7 +233,7 @@ This last category is a small menagerie of miscellaneous *EntityAspect* members
233
233
234
234
-***entity***- a backward reference to the entity that holds this *EntityAspect*
235
235
-***entityManager*** - the *EntityManager* to which this entity is attached ... or was attached. It's null if the entity is new and not yet added to a manager.
236
-
-***getKey*** - a function returning the entity's [`EntityKey`](/doc-js/api-docs/classes/EntityKey.html). A key is an object that uniquely identifies the entity in cache and in remote storage. The key is not a simple JavaScript value. It's an object the identifies the type of the entity and the value ... or values ... of the key; Breeze supports entities with composite keys.
236
+
-***getKey*** - a function returning the entity's [`EntityKey`](/doc-js/api-docs/classes/entitykey.html). A key is an object that uniquely identifies the entity in cache and in remote storage. The key is not a simple JavaScript value. It's an object the identifies the type of the entity and the value ... or values ... of the key; Breeze supports entities with composite keys.
237
237
-***isBeingSaved*** - a property that returns `true` if this entity is one in a batch of entities being saved and the save operation is still in progress. Your application may need to prevent further changes to the entity until the save operation completes, successfully or not.
238
238
-***loadNavigationProperty*** - you can download related entities, on demand, by calling `loadNavigationProperty` as described in the [Navigation Properties](/doc-js/navigation-properties.html) topic.
239
239
@@ -242,7 +242,7 @@ This last category is a small menagerie of miscellaneous *EntityAspect* members
242
242
243
243
You typically access the breeze entity infrastructure through the *entityAspect* property. Breeze also injects a few more entity-oriented members into the model object's prototype. These members are visible on the entity's surface API.
244
244
245
-
***entityType*** - a property that returns the Breeze [type information object](/doc-js/api-docs/classes/EntityType.html) metadata describing this type of entity.
245
+
***entityType*** - a property that returns the Breeze [type information object](/doc-js/api-docs/classes/entitytype.html) metadata describing this type of entity.
246
246
247
247
var customerType = manager.metadataStore.getEntityType("Customer");
Copy file name to clipboardExpand all lines: doc-js/lap-add-entity.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ But there are important Breeze lessons to learn from this long-form of entity cr
54
54
55
55
Every entity instance has a type that you can access through its `entityType` property. The type of an entity is itself an object, an instance of the Breeze `EntityType`.
56
56
57
-
The `EntityType` is a container for metadata that describe a Breeze entity type. It knows about the type's constructor, validation rules, and properties; the detail about properties is wide ranging (check out the <ahref="/doc-js/api-docs/classes/DataProperty.html">`DataProperty`</a> metadata object in the Breeze API docs).
57
+
The `EntityType` is a container for metadata that describe a Breeze entity type. It knows about the type's constructor, validation rules, and properties; the detail about properties is wide ranging (check out the <ahref="/doc-js/api-docs/classes/dataproperty.html">`DataProperty`</a> metadata object in the Breeze API docs).
58
58
59
59
Perhaps most importantly, the `EntityType` knows how to create new instances of an entity type. We used that feature a moment ago when we called its `createEntity` method. We got hold of an EntityType object for TodoItems from the EntityManager's *metadatastore* with this line.
Copy file name to clipboardExpand all lines: doc-js/lap-changetracking.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ You delete an entity by changing its `EntityState` to "Deleted" like this:
48
48
`setDeleted` does not destroy the object locally nor does it remove the entity from the database. The entity simply remains in cache in its new "Deleted" state ... as changed and added entities do. A successful save does delete the entity from the database and remove it from cache.
49
49
50
50
## PropertyChanged
51
-
A Breeze entity property raises a `propertyChanged` event when it is changed to a different value. You attach an event handler to that event to listen for changes to *a* specific property of *one specific entity instance* as explained in the [API documentation for this event](/doc-js/api-docs/classes/EntityAspect.html#event_propertyChanged).
51
+
A Breeze entity property raises a `propertyChanged` event when it is changed to a different value. You attach an event handler to that event to listen for changes to *a* specific property of *one specific entity instance* as explained in the [API documentation for this event](/doc-js/api-docs/classes/entityaspect.html#propertychanged).
52
52
53
53
// assume order is an order entity attached to an EntityManager.
@@ -114,9 +114,9 @@ You just learned how to listen for a change to *a single Knockout property of a
114
114
115
115
## EntityManager.entityChanged Event
116
116
117
-
The `EntityManager` is always watching for changes to entities in its cache and when it detects a change to an entity, it raises the [entityChanged event](/doc-js/api-docs/classes/EntityManager.html#event_entityChanged).
117
+
The `EntityManager` is always watching for changes to entities in its cache and when it detects a change to an entity, it raises the [entityChanged event](/doc-js/api-docs/classes/entitymanager.html#entitychanged).
118
118
119
-
The manager raises the event when it detects many different kinds of changes which it calls "entity actions". The Breeze [`EntityAction` enumeration](/doc-js/api-docs/classes/EntityAction.html) describes them.
119
+
The manager raises the event when it detects many different kinds of changes which it calls "entity actions". The Breeze [`EntityAction` enumeration](/doc-js/api-docs/classes/entityaction.html) describes them.
120
120
121
121
Here's how you might subscribe to `eventChanged` to respond to property changes:
0 commit comments