Skip to content

breeze-client / Entity

Interface: Entity ​

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

An instance of an EntityType: an object with a key, tracked by an EntityManager once attached. Breeze gives every entity these members, whether its class declares them or not.

Properties ​

entityAspect ​

entityAspect: EntityAspect

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

The EntityAspect that holds this entity's Breeze state: its EntityState, key, original values, validation errors and manager.


entityType ​

entityType: EntityType

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

The EntityType that describes this entity.

Methods ​

getProperty() ​

getProperty(prop): any

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

Get the property with the given name

Parameters ​

prop ​

string

Returns ​

any


setProperty() ​

setProperty(prop, value): any

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

Set the property with the given name, exactly as assigning it would.

With the backing-store model library it returns the object itself, so calls can be chained. The return type is any rather than this so that a class declaring setProperty as returning void still implements this interface.

A name that is not a property of the type is not an error: like an assignment, it creates an ordinary property, which Breeze does not track.

Parameters ​

prop ​

any

value ​

any

Returns ​

any

Released under the MIT License.