NavigationProperty constructor
let homeAddressProp = new NavigationProperty( {
name: "homeAddress",
entityTypeName: "Address:#myNamespace",
isScalar: true,
associationName: "address_person",
foreignKeyNames: ["homeAddressId"]
});
let homeAddressIdProp = new DataProperty( {
name: "homeAddressId"
dataType: DataType.Integer
});
// assuming personEntityType is a newly constructed EntityType
personEntityType.addProperty(homeAddressProp);
personEntityType.addProperty(homeAddressIdProp);
A configuration object.
The name of the association to which that this property belongs. This associationName will be shared with this properties 'inverse'. Read Only
Property on the base type that this property is inherited from. Will be null if the property is not on the base type. Read Only
A free form object that can be used to define any custom metadata for this NavigationProperty.
The display name of this property. Read Only
The EntityType returned by this property. Read Only
The name of the EntityType returned by this property. Read Only
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. Read Only
The server side 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. Read Only
Is this a DataProperty? - always false here Allows polymorphic treatment of DataProperties and NavigationProperties. Read Only
Is this a NavigationProperty? - always true here Allows polymorphic treatment of DataProperties and NavigationProperties. Read Only
Whether this property returns a single entity as opposed to an array of entities. Read Only
The name of this property. Read Only
The name of this property on the server. Read Only
The EntityType that this property belongs to. ( same as entityType). Read Only
The EntityType that this property belongs to. ( same as entityType). Read Only
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. Read Only
The Validator instances that are associated with this property. Validators can be added and removed from this collection. Read Only
The inverse of this NavigationProperty. The NavigationProperty that represents a navigation in the opposite direction to this NavigationProperty. May be undefined for a undirectional NavigationProperty. Read Only
General purpose property set method
// assume myEntityType is an EntityType
let prop = myEntityType.getProperty("myProperty");
prop.setProperties( {
custom: { foo: 7, bar: "test" }
});
A config object
Generated using TypeDoc
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.