Names and References in a File Store
A file store is read by name. BimlFlex never reads an entity's identity from a file name or a folder name, so you can rename a file without changing the model.
Identity is the name
The identity of an entity is its name property, together with the identity parts of its kind where the kind has them. Identity parts are top level properties of the entity document. File names are never read for identity.
- An entity with no name, or with a required identity part missing, is an error (BFXF021).
- In a map file, the key of an entry is the entry's name when the entry has no
nameproperty. An explicitnamemust agree with the key. A disagreement is an error (BFXF022).
Entity documents carry no generated identifier. The $id property is not part of the format. BimlFlex reports it as information (BFXF023i) and leaves it out when it rewrites the file.
Comparing names
Names compare case-insensitively, so Customer and customer are the same name. BimlFlex refuses a second name that matches an existing name after case folding or Unicode normalization, both when it loads a store and when it saves a change.
A name collision is two entities of one kind and one scope whose names are the same under this rule. A collision is an error (BFXF020). BimlFlex names both entities, and neither of them loads.
Where a name must be unique
A name is unique either across the whole store or within the entity's parent. The table lists the scope and the identity of every entity kind.
| Kind | Unique within | Identity |
|---|---|---|
| Connection | The store | name |
| AdfLinkedService | The store | name |
| Batch | The store | name |
| Project | The store | name |
| ExtensionPoint | The store | name |
| Macro | The store | name |
| Setting | The store | name |
| Configuration | The store | name |
| DataTypeMapping | The store | name |
| BusinessEntityType | The store | name |
| BusinessSubject | The store | name |
| BusinessClassification | The store | name |
| BusinessModelConfiguration | The store | name |
| BusinessRelationship | The store | name |
| BusinessTag | The store | name |
| LibraryRule | The store | name |
| BusinessModelEntity | The store | name |
| BusinessEntity | The store | businessObjectType and name |
| BusinessModel | The store | businessModelType and name |
| BusinessDomain | The store | name and industry |
| Object | Its connection | schema and name |
| Column | Its object | name |
| BusinessAttribute | Its business entity | name |
| Parameter | Its connection, object or column, or the store root when it has no parent | name |
| RuleSet | Its object | name |
| Rule | Its rule set | name |
| RuleReference | Its rule set | name |
| CustomAttribute | Its parent | attributeKey and attributeValue |
A business model entity's name is unique across the whole store, although its file sits under its business model.
For an object, an absent schema equals an empty one.
A custom attribute has no name. Its identity is its parent together with its attributeKey and attributeValue.
A rule reference has no name of its own. Its name property holds its ordinal written as text, such as 1, and that text identifies the reference within its rule set.
Writing a reference
A reference to another entity is written as the name of the target.
- When the target kind is unique across the store and is identified by
namealone, the reference is a plain string that holds the name. - For any other target kind, the reference is an object that holds the parent and the name parts of the target.
A reference with the wrong shape for its target kind is an error (BFXF014). A reference to an entity that does not exist is an error (BFXF003).
The parent of a split out child
A child that is split out into its own file carries a property that names its parent. The folder the file sits in must agree with that parent. A missing parent property, or a folder that disagrees with it, is an error (BFXF022).
See File Store Layout for where split out children are placed, and File Store Diagnostic Codes for every code.