ↈ_primitiveArray_ Class
Primitive arrays are not actually classes, they are objects that mimic arrays. A primitive array is collection of primitive types associated with a data property on a single entity or complex object. i.e. customer.invoiceNumbers. This collection looks like an array in that the basic methods on arrays such as 'push', 'pop', 'shift', 'unshift', 'splice' are all provided as well as several special purpose methods.
Item Index
Events
Events
arrayChanged
An Event that fires whenever the contents of this array changed. This event is fired any time a new entity is attached or added to the EntityManager and happens to belong to this collection. Adds that occur as a result of query or import operations are batched so that all of the adds or removes to any individual collections are collected into a single notification event for each relation array.
Event Payload:
-
added
Array of PrimitivesAn array of all of the items added to this collection.
-
removed
Array of PrimitivesAn array of all of the items removed from this collection.
Example:
// assume order is an order entity attached to an EntityManager.
orders.arrayChanged.subscribe(
function (arrayChangedArgs) {
var addedEntities = arrayChangedArgs.added;
var removedEntities = arrayChanged.removed;
});