ObjectGears Help

Forum   ObjectGears (Version:

Reference to a class or user

When using a special notation you can create a column of type Value from a referenced class. This column enables to link query data to a class record.

ObjectGears system cannot found out where are query data from. Therefore, you have to determine it by means of column name. Correctness of the link (correct class and mapping ID) is responsibility of the query creator.

Format of the column name for columns of type reference to a single record

The required information has to be input in te column name. Add three signs of underscore after the column name and code of the target class or word person.


Example of the link of the column mybuilding to the class building:


Example of the link of the column teamleader to user:


In both cases both cases query columns have to contain ID from the class or user ID.

A complete example:

SELECT my.building AS mybuilding___building, my.teamleader AS teamleader___person
FROM {{: class.myclass :}} my

Reference to a class from another model

In case that the referred class belongs to another model you have state in the column name also model code. Put the model code infront of the class code and separate them with colon. The whole name must be then put in braces.

We will use the previous example with one difference: class building will be defined in model myModel.

SELECT my.building AS [mybuilding___mymodel:building], my.teamleader AS teamleader___person
FROM {{: class.myclass :}} my

Format of the column name for columns of type reference to more records

The query syntax for reference to column of type reference to more records is following:

record_identifies required_query_column_name___class_code___column_code

ap.id approvers___approval_process___approvers

The whole query example:

SELECT ap.id,
ap.id approvers___approval_process___approvers,
ap.id company___approval_process___applicable_for,
ap.id process___approval_process___cl_approval_process
FROM {{:class.approval_process:}} ap


Examples of creating queries with references are shown in Examples and recommended techniques.

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information