doc/builds.md in power_stencil-0.4.20 vs doc/builds.md in power_stencil-0.4.21
- old
+ new
@@ -66,13 +66,11 @@
```yaml
--- !ruby/object:PowerStencil::SystemEntityDefinitions::ProjectEntity
:name: inherited_entity
:a_specific_property: This one only exists in inherited entity
-:extends: !psref
- type: :base_entity
- name: root_entity
+:extends: !entity base_entity/root_entity
:array_root:
- value from inherited_entity
:hash_root:
item2: value2 but from inherited
item3: value3
@@ -95,13 +93,11 @@
- value from inherited_entity
:hash_root:
item1: value 1
item2: value2 but from inherited
item3: value3
-:extends: !psref
- type: :base_entity
- name: root_entity
+:extends: !entity base_entity/root_entity
```
You can notice that this second object looks now like a merged entity. Here are the rules of the merge:
- the entity extending another one has always precedence, meaning that if a property is defined in both, only the latter is kept.
@@ -125,13 +121,11 @@
And define its content:
```yaml
--- !ruby/object:UniverseCompiler::Entity::Override
:overrides:
-- !psref
- type: :base_entity
- name: inherited_entity
+- !entity base_entity/inherited_entity
:name: test_override
:property_from_overide: foo
:scenario: dev_tests
:hash_root:
item3: overridden value
@@ -159,13 +153,11 @@
:hash_root:
item1: value 1
item2: value2 but from inherited
item3: value3
:a_specific_property: This one only exists in inherited entity
-:extends: !psref
- type: :base_entity
- name: root_entity
+:extends: !entity base_entity/root_entity
```
But if you specify the dev_tests scenario:
$ power_stencil get base_entity/inherited_entity --raw --compiled --scenario dev_tests
```yaml
@@ -177,13 +169,11 @@
:hash_root:
item1: value 1
item2: value2 but from inherited
item3: overridden value
:a_specific_property: This one only exists in inherited entity
-:extends: !psref
- type: :base_entity
- name: root_entity
+:extends: !entity base_entity/root_entity
:property_from_overide: foo
```
:information_source: You can notice that **the override mechanism occurs after the extend mechanism**, and both can be used on the same entities.
@@ -228,12 +218,10 @@
---
PowerStencil::SystemEntityDefinitions::SimpleExec:
:type: :simple_exec
:fields:
:name: example
- :post_process: !psref
- type: :process_descriptor
- name: simple_exec_example.process
+ :post_process: !entity process_descriptor/simple_exec_example.process
---
PowerStencil::SystemEntityDefinitions::ProcessDescriptor:
:type: :process_descriptor
:fields:
\ No newline at end of file