Skip to content

breeze-client / ComplexAspect

Class: ComplexAspect ​

Defined in: src/entity/entity-aspect.ts:1320

An ComplexAspect instance is associated with every complex object instance and is accessed via the complex object's 'complexAspect' property.

The ComplexAspect itself provides properties to determine the parent object, parent property and original values for the complex object.

A ComplexAspect will almost never need to be constructed directly. You will usually get an ComplexAspect by accessing an entities 'complexAspect' property. This property will be automatically attached when an complex object is created as part of an entity via either a query, import or EntityManager.createEntity call.

ts
// assume address is a complex property on the 'Customer' type
var aspect = aCustomer.address.complexAspect;
// aCustomer === aspect.parent;

Extended by ​

Constructors ​

Constructor ​

new ComplexAspect(complexObject, parent, parentProperty): ComplexAspect

Defined in: src/entity/entity-aspect.ts:1337

You will rarely, if ever, create a ComplexAspect directly.

Parameters ​

complexObject ​

ComplexObject

parent ​

StructuralObject

parentProperty ​

DataProperty

Returns ​

ComplexAspect

Properties ​

complexObject ​

complexObject: ComplexObject

Defined in: src/entity/entity-aspect.ts:1323

The complex object that this aspect is associated with. Read Only


extraMetadata? ​

optional extraMetadata?: any

Defined in: src/entity/entity-aspect.ts:1334

Unlike EntityAspect.extraMetadata, Breeze does not fill this in and does not export it. An application may use it to hold its own data about the complex object.


originalValues ​

originalValues: Record<string, any>

Defined in: src/entity/entity-aspect.ts:1327

The 'original values' of this complex object where they are different from the 'current values'. This is a map where the key is a property name and the value is the 'original value' of the property. Read Only


parent? ​

optional parent?: StructuralObject

Defined in: src/entity/entity-aspect.ts:1329

The parent object that to which this aspect belongs; this will either be an entity or another complex object. Read Only


parentProperty? ​

optional parentProperty?: DataProperty

Defined in: src/entity/entity-aspect.ts:1331

The DataProperty on the 'parent' that contains this complex object. Read Only

Methods ​

getEntityAspect() ​

getEntityAspect(): any

Defined in: src/entity/entity-aspect.ts:1380

Returns the EntityAspect for the top level entity that contains this complex object.

Returns ​

any

Released under the MIT License.