SpineEventEngine / core-java

The Java implementation of the framework core
https://spine.io
Apache License 2.0
36 stars 12 forks source link

Allow Invalid Entity States on Query #840

Closed dmdashenkov closed 6 years ago

dmdashenkov commented 6 years ago

When querying a projection, there is an option to specify a FieldMask for the projection state.

If the mask does not contain all the required fields (as well as required_field groups, goes.with matches, etc.), the resulting state message is not considered valid, thus the entity refuses to update its state and throws an exception.

We should allow entities to be invalid on the query side.

dmdashenkov commented 6 years ago

@armiol, PTAL at the proposal. There might be an intelligent design behind the current behavior that I'm not aware of.

dmdashenkov commented 6 years ago

As discussed with @alexander-yevsyukov, this problem should be resolved by weakening the projection state validation.