Show:

NavigationProperty Class

Module: breeze

A NavigationProperty describes the metadata for a single property of an EntityType that return instances of other EntityTypes.

Instances of the NavigationProperty class are constructed automatically during Metadata retrieval. However it is also possible to construct them directly via the constructor.

Methods

setProperties

(
  • config
)

General purpose property set method

Parameters:

  • config Object

    [object]

    • [inverse] String optional
    • [custom] Object optional

Example:

// assume myEntityType is an EntityType
var prop = myEntityType.getProperty("myProperty");
prop.setProperties( {
    custom: { foo: 7, bar: "test" }
});

Properties

associationName

String

The name of the association to which that this property belongs. This associationName will be shared with this properties 'inverse'.

readOnly

baseProperty

NavigationProperty

Property on the base type that this property is inherited from. Will be null if the property is not on the base type.

readOnly

custom

Object

A free form object that can be used to define any custom metadata for this NavigationProperty.

readOnly

displayName

String

The display name of this property

readOnly

entityType

EntityType

The EntityType returned by this property.

readOnly

foreignKeyNames

Array of String

The names of the foreign key DataProperties associated with this NavigationProperty. There will usually only be a single DataProperty associated with a Navigation property except in the case of entities with multipart keys.

readOnly

inverse

NavigationProperty

The inverse of this NavigationProperty. The NavigationProperty that represents a navigation in the opposite direction to this NavigationProperty.

readOnly

isDataProperty

Boolean

Is this a DataProperty? - always false here Allows polymorphic treatment of DataProperties and NavigationProperties.

readOnly

isNavigationProperty

Boolean

Is this a NavigationProperty? - always true here Allows polymorphic treatment of DataProperties and NavigationProperties.

readOnly

isScalar

Boolean

Whether this property returns a single entity or an array of entities.

readOnly

name

String

The name of this property

readOnly

nameOnServer

String

The name of this property on the server

readOnly

parentEntityType

EntityType

The EntityType that this property belongs to. readOnly

parentType

EntityType

The EntityType that this property belongs to. ( same as parentEntityType). readOnly

relatedDataProperties

Array of DataProperty

The 'foreign key' DataProperties associated with this NavigationProperty. There will usually only be a single DataProperty associated with a Navigation property except in the case of entities with multipart keys.

readOnly

validators

Array of Validator

The Validators that are associated with this property. Validators can be added and removed from this collection.

readOnly