4D v18

dataClass.{attributeName}

Home

 
4D v18
dataClass.{attributeName}

dataClass.{attributeName} 


 

   
Parameter Type   Description
dataClass.{attributeName}   DataClassAttribute in 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}



See also 

4D Blog - ORDA member methods to get the structure information
ORDA - DataClassAttribute

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataClass

 
HISTORY 

Created: 4D v17

 
ARTICLE USAGE

4D Language Reference ( 4D v18)