Collection base¶
Collection base - an attribute in the object, by the value of which the search of objects in the collection is performed. The search is based on the comparison of collection base with the back reference attribute.
Purpose of use¶
The base of the collection can be used to create dynamic collections. It means that the objects in the collection can be loaded depending on the entered data or calculated values by the formula, unlike regular back reference with search only by key attributes.
Example¶
For example in the develop-and-test project there are two classes:
`` searchRefs`` has the string attribute `` code_binding ‘’ added as a back reference for the
binding
.{ "orderNumber": 30, "name": "code_binding", "caption": "Код для binding", "type": 0, "size": null, "decimals": 0, "allowedFileTypes": null, "maxFileCount": 0, "nullable": true, "readonly": false, "indexed": true, "unique": false, "autoassigned": false, "hint": null, "defaultValue": null, "refClass": "", "itemsClass": null, "backRef": null, "backColl": "", "binding": "", "semantic": "", "selConditions": null, "selSorting": [], "selectionProvider": null, "indexSearch": false, "eagerLoading": false, "formula": null }
In the
backref_searchRefs
class thebackref_searchRefs_binding
andbackref_searchRefs_text
attributes are used.backref_searchRefs_binding
is a dynamic collection, and thebackref_searchRefs_text
is used as a filter for thebackref_searchRefs_binding
collection. In thebackref_searchRefs_binding
collection the selection is occured by the equality ofbackref_searchRefs_text
values from thebackref_searchRefs
class andcode_binding values
from thesearchRefs
class. When adding objects to the collection manually, thecode_binding
attribute is automatically filled.
{
"orderNumber": 25,
"name": "backref_searchRefs_binding",
"caption": "Обратная ссылка (с подключенным binding) на класс searchRefs",
"type": 14,
"size": null,
"decimals": 0,
"allowedFileTypes": null,
"maxFileCount": 0,
"nullable": true,
"readonly": false,
"indexed": false,
"unique": false,
"autoassigned": false,
"hint": null,
"defaultValue": null,
"refClass": "",
"itemsClass": "searchRefs",
"backRef": "code_binding",
"backColl": "",
"binding": "backref_searchRefs_text",
"semantic": null,
"selConditions": null,
"selSorting": [],
"selectionProvider": null,
"indexSearch": false,
"eagerLoading": false,
"formula": null
},
{
"orderNumber": 30,
"name": "backref_searchRefs_text",
"caption": "Значение",
"type": 0,
"size": null,
"decimals": 0,
"allowedFileTypes": null,
"maxFileCount": 0,
"nullable": true,
"readonly": false,
"indexed": true,
"unique": false,
"autoassigned": false,
"hint": null,
"defaultValue": null,
"refClass": "",
"itemsClass": "",
"backRef": "",
"backColl": "",
"binding": "",
"semantic": null,
"selConditions": null,
"selSorting": [],
"selectionProvider": null,
"indexSearch": false,
"eagerLoading": false,
"formula": null
}