4D v19dataClass.get( ) |
||||||||
|
4D v19
dataClass.get( )
|
Property | Type | Description |
context | Text | Label for the automatic optimization context applied to the entity. This context will be used by the subsequent code that loads the entity so that it can benefit from the optimization. This feature is designed for client/server processing; for more information, please refer to the Client/server optimization section. |
C_OBJECT($entity)
$entity:=ds.Employee.get(167) // return the entity whose primary key value is 167
$entity:=ds.Invoice.get("DGGX20030") // return the entity whose primary key value is "DGGX20030"
This example illustrates the use of the context property:
C_OBJECT($e1;$e2;$e3;$e4;$settings;$settings2)
$settings:=New object("context";"detail")
$settings2:=New object("context";"summary")
$e1:=ds.Employee.get(1;$settings)
completeAllData($e1) // In completeAllData method, an optimization is triggered and associated to context "detail"
$e2:=ds.Employee.get(2;$settings)
completeAllData($e2) // In completeAllData method, the optimization associated to context "detail" is applied
$e3:=ds.Employee.get(3;$settings2)
completeSummary($e3) //In completeSummary method, an optimization is triggered and associated to context "summary"
$e4:=ds.Employee.get(4;$settings2)
completeSummary($e4) //In completeSummary method, the optimization associated to context "summary" is applied
Product: 4D
Theme: ORDA - DataClass
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)