Use registred CustomSerializer for Criteria-Objects#4866
Open
jensbrand wants to merge 2 commits into
Open
Conversation
…ated `DataPortalProxy` to use `IDataPortal<PrimitiveCriteria>` for criteria creation.
StefanOssendorf
left a comment
Contributor
There was a problem hiding this comment.
Hi. Thank you for your contribution.
However I think this is the wrong approach to solve this issue. The PrimitiveCriteria was meant to deal with the .net primitives (int, string, DateTime, ...) and not with custom serializers.
I think the correct way would be something like adding a way to ISerializationFormatter to ask if it can check a particular type.
If yes: Skip PrimitiveCriteria
If no: Use PrimitiveCriteria
But this is something more fundamental where I'd like to get @rockfordlhotka opinion this. Your way works, maybe as a temporary implementation, but it should be implemented in another way for the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IMobileObjectbypass registered custom serializers, causing serialization errors.PrimitiveCriteriainto aReadOnlyBaseand updatedDataPortalProxyto instantiate it via the data portal.Related Issue
Fixes #4865 (Custom Serializer for Criteria-Objects)