zg-entity

zg-entity is a predefined object to access to fields and properties of a table in the database. You need to write zg-entity with square brackets if you don't use it with a built-in function. In build-in functions it is used with parantheses.

zg-entity object can be used in zsif, zref and ziref file directly.

Example Usage

// access to name field of an entity
[[[zg-entity...zg-name]]]

Example Usage as a Built-in Function Parameter

// access to name field of an entity and singularize it using built-in function
zg-singularize(((zg-entity...zg-name)))

Fields and Properties of zg-entity

Every field and property has a purpose in Zontroy to store spesific data for code generation.

zg-fields

zg-fields is a collection of fields in an entity like columns in a table. You need to iterate zg-fields using zg-for loop to access the properties of each field.

[[[zg-entity...zg-fields]]]

zg-pkFields

This is a collection of primary key fields in a table. This property supports multiple primary keys. While iterating list of primary keys you can access the properties of each primary key field.

[[[zg-entity...zg-pkFields]]]

zg-referencingFields

List of referencing fields of an entity is accesible by zg-referencingFields. It also means that zg-referencingFields is a collection of foreign keys in a table.

[[[zg-entity...zg-referencingFields]]]

zg-referencedFields

zg-referencingFields is an object for the list of referenced fields of an entity by another entity. It also means that zg-referencedFields is a collection of columns in a table referenced by another table in the database.

[[[zg-entity...zg-referencedFields]]]

zg-schema

It means the name of schema in the database.

[[[zg-entity...zg-schema]]]

zg-name

It means the name of entity in the database.

[[[zg-entity...zg-name]]]

zg-targetName

It means the name of entity given by developer in Zontroy Properties Window.

[[[zg-entity...zg-targetName]]]

zg-alternativeName

It means the alternative name of entity given by developer in Zontroy Properties Window.

[[[zg-entity...zg-alternativeName]]]

zg-label

It means the label of entity given by developer in Zontroy Properties Window.

[[[zg-entity...zg-label]]]

zg-rowOrder

It means the order of entity given by developer in Zontroy Properties Window. Zontroy sorts entities by value of row order property automatically.

[[[zg-entity...zg-rowOrder]]]

zg-description

It means the description of entity given by developer in Zontroy Properties Window.

[[[zg-entity...zg-description]]]

zg-displayFields

zg-displayFields is a collection of fields enterd by developer in Zontroy Properties Window and it is a group of field to use further.

[[[zg-entity...zg-displayFields]]]

zg-extra1

zg-extra1 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra1]]]

zg-extra2

zg-extra2 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra2]]]

zg-extra3

zg-extra3 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra3]]]

zg-extra4

zg-extra4 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra4]]]

zg-extra5

zg-extra5 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra5]]]

zg-extra6

zg-extra6 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra6]]]

zg-extra7

zg-extra7 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra7]]]

zg-extra8

zg-extra8 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra8]]]

zg-extra9

zg-extra9 is a reserved property to be given by developer for personal purpose in Zontroy Properties Window.

[[[zg-entity...zg-extra9]]]

Last updated