# new UBEntityAttribute (attributeInfoobject, attributeCodestring, entityUBEntity)

Arguments:

Members

# allowNull : boolean instance

Attribute value can be empty or null

# allowSort : boolean instance

Allow order by clause by this attribute

# associatedEntity : string instance

Name of entity referenced by the attribute (for attributes of type Many - entity name from the AssociationManyData)

# associationAttr : string instance

# associationManyData : string instance

For attributes of type Many - name of the many-to-many table. UB create system entity with this name and generate table during DDL generation

# caption : string instance

# cascadeDelete : boolean instance

For attributes of type Entity enable cascade deletion on application server level (not on database level)

# code : string instance

# customSettings : object instance

# dataType : UBDomain.ubDataTypes instance

Data type

# defaultValue : string instance

# defaultView : boolean instance

If true - the client should show this attribute in auto-build forms and in '*' select fields

# description : string instance

# documentation : string instance

# enumGroup instance

For attributes of type Enum - code of enumeration group from ubm_enum.eGroup

Name Type Description
enumGroup string

# generateFK : boolean instance

For attributes of type Entity. If false - bypass foreign key generation by DDL generator

# hasCatalogueIndex instance

Index of type CATALOGUE exists for attribute

Name Type Description
hasCatalogueIndex boolean

# isMultiLang : boolean instance

# isUnique : boolean instance

# mapping : UBEntityAttributeMapping instance

Optional mapping of attribute to physical data (for extended domain info only). Calculated from an entity mapping collection in accordance with application connection configuration

# name : string instance

# physicalDataType instance

Name Type Description
physicalDataType string

# readOnly : boolean instance

Edition allowed (not verified by server side)

# size : number instance

# storeName : string instance

For attributes of type Document - name of BLOB store from application storeConfig. If empty - default store will be used

Methods

# asPlainJSON () → object instance

Return a JSON representation of attribute WITHOUT properties which have default values

# getAssociatedEntity () → UBEntity instance

Return associated entity or null if type of attribute !==Entity