This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
dataClass.{attributeName}
|
dataClass.{attributeName} -> dataClass.<attributeName> | ||||||||
Parameter | Type | Description | ||||||
dataClass.<attributeName> | DataClassAttribute |
![]() |
Dataclass attribute description | |||||
The attributes of dataclasses are objects that are available directly as properties of these classes.
The returned objects are of the DataClassAttribute type. These objects have properties that you can read to get information about your dataclass attributes. These properties are listed in the ORDA - DataClassAttribute section.
Note: Dataclass attribute objects can be modified, but the underlying database structure will not be altered.
$salary:=ds.Employee.salary //returns the salary attribute in the Employee dataclass
$compCity:=ds.Company["city"] //returns the city attribute in the Company dataclass
Considering the following database structure:
C_OBJECT($firstnameAtt;$employerAtt;$employeesAtt)
$firstnameAtt:=ds.Employee.firstname
//{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true,
//keywordIndexed:false,autoFilled:false,mandatory:false,unique:false}
$employerAtt:=ds.Employee.employer
//{name:employer,kind:relatedEntity,relatedDataClass:Company,
//fieldType:38,type:Company,inverseName:employees}
//38=Is object
$employeesAtt:=ds.Company.employees
//{name:employees,kind:relatedEntities,relatedDataClass:Employee,
//fieldType:42,type:EmployeeSelection,inverseName:employer}
//42=Is collection
Considering the following table properties:
C_OBJECT($sequenceNumberAtt)
$sequenceNumberAtt=ds.Employee.sequenceNumber
//{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13,
//indexed:true,keywordIndexed:false,autoFilled:true,mandatory:false,unique:true}
4D Blog - ORDA member methods to get the structure information
ORDA - DataClassAttribute
Product: 4D
Theme: ORDA - DataClass
Created: 4D v17
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)