You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am tracking the history of certain items within some container entity. These items are linked to the container via a set of associations, which determine whether it's a currently valid, future, or historical item. Further, I can have multiple unrelated types of items history-tracked this way within a single container entity. By using a Structure I am able to design a generic, reusable solution.
Currently, to achieve at least a partial reusability of the pattern, I have to use an interface instead of a Structure descendant, and use an explicit implementation in the container object, so that I am able to support multiple unrelated types of items, like in the example above. This is less convenient and misuses interface implementations where Structure-based composition would be more appropriate
The text was updated successfully, but these errors were encountered:
We need to think of it and investigate possibilities because EntitySet is a complex structure which represents connection between tables unlike reference to another Entity which has actual column in tables. So EntitySet requires an entity as owner. Structure has no such rule and that allows Structures to be instantiated outside entity. I guess it will be not so easy to "merry" them
Currently, associations are not supported in structures. Consider the following example showing how this could be useful:
I am tracking the history of certain items within some container entity. These items are linked to the container via a set of associations, which determine whether it's a currently valid, future, or historical item. Further, I can have multiple unrelated types of items history-tracked this way within a single container entity. By using a
Structure
I am able to design a generic, reusable solution.Currently, to achieve at least a partial reusability of the pattern, I have to use an interface instead of a
Structure
descendant, and use an explicit implementation in the container object, so that I am able to support multiple unrelated types of items, like in the example above. This is less convenient and misuses interface implementations whereStructure
-based composition would be more appropriateThe text was updated successfully, but these errors were encountered: