Currently, the EntitySelection allows as a value an object that does not explicitly list all properties that are to be selected. When it comes to performing operations (subtract/merge/intersect), it'll query the EntitySchema for the default selection when necessary.
The reason I did it this way (that change is actually quite recently and wasn't like this for a long time before that) was to make construction of EntitySelections easier for the user.
Why
Several reasons:
impossible to represent a partial EntitySelection (i.e. if "Id" & "Name" is required in Entity, no way to just select "Id")
it makes the code of operations (subtract/merge/intersect) quite a bit more complex
harder to grasp mentally what the difference between two EntitySelections is
ease of EntitySelection creation by the User can be done outside the class, making EntitySelection itself simpler
it requires that the EntitySchema exists and is fully described (at least the parts the EntitySelection targets) when operations are executed
What
Currently, the EntitySelection allows as a value an object that does not explicitly list all properties that are to be selected. When it comes to performing operations (subtract/merge/intersect), it'll query the EntitySchema for the default selection when necessary.
The reason I did it this way (that change is actually quite recently and wasn't like this for a long time before that) was to make construction of EntitySelections easier for the user.
Why
Several reasons: