DataProperty constructor
let lastNameProp = new DataProperty( {
name: "lastName",
dataType: DataType.String,
isNullable: true,
maxLength: 20
});
// assuming personEntityType is a newly constructed EntityType
personEntityType.addProperty(lastNameProperty);
A configuration Object or a DataProperty
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
The ComplexType associated with this property; may be undefined. Read Only
The name of the ComplexType associated with this property; may be null. Read Only
A free form object that can be used to define any custom metadata for this DataProperty. Read Only
The DataType of this property. Read Only
The default value for this property. Read Only
The display name of this property. Read Only
Whether the contents of this property is an instance of a ComplexType. Read Only
Is this a DataProperty? - always true here. Allows polymorphic treatment of DataProperties and NavigationProperties. Read Only
Is this a NavigationProperty? - always false here. Allows polymorphic treatment of DataProperties and NavigationProperties. Read Only
Whether this property is nullable. Read Only
Whether this property is a 'key' property. Read Only
Whether this property is scalar (i.e., returns a single value as opposed to an array). Read Only
Whether this property is 'settable'. Read Only
Whether this property is an 'unmapped' property. Read Only
The maximum length for the value of this property. Only meaningful for strings. Read Only
The name of this property. Read Only
The name of this property on the server. Read Only
The parent type that this property belongs to - will be either a EntityType or a ComplexType. Read Only
The raw type name of this property. will only be defined for properties with a DataType of 'Undefined'
The navigation property related to this property. Will only be set if this is a foreign key property. Read Only
The Validator instances that are associated with this property. Validators can be added and removed from this collection. Read Only
General purpose property set method
// assume em1 is an EntityManager
let prop = myEntityType.getProperty("myProperty");
prop.setProperties( {
custom: { foo: 7, bar: "test" }
});
A configuration object.
Generated using TypeDoc
A DataProperty describes the metadata for a single property of an EntityType that contains simple data.
Instances of the DataProperty class are constructed automatically during Metadata retrieval. However it is also possible to construct them directly via the constructor.