tree-ware / tree-ware-kotlin-core

Apache License 2.0
1 stars 0 forks source link

Allow aux values to be set inside the entity of a composition single-field #167

Open deepak-nulu opened 2 years ago

deepak-nulu commented 2 years ago

Currently, aux values for single-fields need to be set at the field level. This is so that primitive values need not be wrapped inside a wrapper-object to allow aux values to be stored along with the primitive values. The same choice was made for composition single-fields even though the value is an object and can store the aux value in that object without an additional wrapper-object. This is not convenient, especially for the main-model (which is modeled as a single-field composition).

So in the case of single-field compositions, users should be allowed to set the aux value at the field level or inside the entity.

NOTE: this already works for set_ aux due to inheritance of set_ aux.

deepak-nulu commented 4 months ago

MainModel will be dropped (#203), so need to re-investigate if this is needed after #203 is resolved.