| 4D v18dataClass.{attributeName} | |||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v18
 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 dataclassConsidering 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 collectionConsidering 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 v18)
	
	
	
 Add a comment
Add a comment