4D v17.4

dataClass.get( )

Home

 
4D v17.4
dataClass.get( )

dataClass.get( )  


 

The dataClass.get( ) method queries the dataclass to retrieve the entity matching the primaryKey parameter.

In primaryKey, pass the primary key value of the entity to retrieve. The value type must match the primary key type set in the datastore (longint or text). You can also make sure that the primary key value is always returned as text by using the entity.getKey( ) method with the dk key as string parameter.

If no entity is found with primaryKey, a Null entity is returned.

Lazy loading is applied, which means that related data is loaded from disk only when it is required.

Example  

 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"



See also 

entity.getKey( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataClass

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v17)
4D Language Reference ( 4D v17.1)
4D Language Reference ( 4D v17.2)
4D Language Reference ( 4D v17.3)
4D Language Reference ( 4D v17.4)