UBEntityAttribute

@unitybase/base/UBDomain~ UBEntityAttribute

new UBEntityAttribute(attributeInfo, attributeCode, entity)

Arguments:
  1. attributeInfo (Object)
  2. attributeCode (String)
  3. entity (UBEntity)

Members

code: String readonly

name: String readonly

dataType: UBDomain.ubDataTypes readonly

Data type

associatedEntity: String readonly

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

associationAttr: String readonly

caption: String readonly

description: String readonly

documentation: String readonly

size: Number readonly

allowNull: boolean readonly

Attribute value can be empty or null

allowSort: boolean readonly

Allow order by clause by this attribute

isUnique: boolean readonly

defaultValue readonly

readOnly: Boolean readonly

Allow edit

isMultiLang readonly

Properties:
Type Description
Boolean

cascadeDelete: Boolean readonly

Possible for dataType=Entity - enable cascade delete on application serve level (not on database level)

enumGroup readonly

Required for dataType=Enum - Group code from ubm_enum.eGroup
Properties:
Name Type Description
enumGroup String

customSettings: Object readonly

associationManyData readonly

Required for dataType=Many - name of the many-to-many table. UB create system entity with this name and generate table during DDL generation
Properties:
Type Description
String

storeName readonly

Applicable to attribute with dataType=Document - name of store from storeConfig application config section. If emtpy - store with isDefault=true will be used

generateFK: boolean

Applicable for dataType=Entity. If false DDL generator will bypass foreign key generation on the database level

defaultView: boolean

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

mapping: UBEntityAttributeMapping readonly

Optional mapping of atribute to phisical data (for extended domain info only). Calculated from a entity mapping collection in accordance with application connection confiduration

physicalDataType readonly

Properties:
Name Type Description
physicalDataType String

Methods

getAssociatedEntity()UBEntity

Return associated entity. Return null if attribute type is not Entity.