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
When generating a Json Patch by comparing 2 states of the model, we sometimes end up with an empty patch (When both models are identical). When using this empty patch with modelServerClient.edit(), this results in a no-op request.
Moreover, when combining this with Transactions (org.eclipse.emfcloud.modelserver.emf.common.ModelServerEditingDomain.closeCompoundCommand()), the resulting CompoundCommand is empty, thus unexecutable. This causes a runtime exception for the transaction.
To avoid empty requests an unnecessary exceptions, we should patch the ModelServerClientV2 to immediately ignore empty patches and avoid the client-server roundtrip entirely.
Currently, the workaround is that all client applications should guard against empty patches:
When generating a Json Patch by comparing 2 states of the model, we sometimes end up with an empty patch (When both models are identical). When using this empty patch with modelServerClient.edit(), this results in a no-op request.
Moreover, when combining this with Transactions (
org.eclipse.emfcloud.modelserver.emf.common.ModelServerEditingDomain.closeCompoundCommand()
), the resulting CompoundCommand is empty, thus unexecutable. This causes a runtime exception for the transaction.To avoid empty requests an unnecessary exceptions, we should patch the ModelServerClientV2 to immediately ignore empty patches and avoid the client-server roundtrip entirely.
Currently, the workaround is that all client applications should guard against empty patches:
The text was updated successfully, but these errors were encountered: