Plain and simple; polymorphic types don't play nicely with the existing RunAtom<T> feature. Not to say they don't play nicely, but in cases where you want a List<MyInheritedType, the entire list is returned as the base class, potentially meaning the loss of all of the fields on that object.
Alternatives
None afaik, other than manually parsing a JObject, and writing a custom serializer to include the type discriminator manually. The best easiest method is using the TypeNameHandling.All argument with the JSON serializer, although this is cited as a potential security risk. Alternatively, the discriminator can be handled manually by RethinkDB and the possibility of ensuring that the discriminator matches the base type of the argument.
If the feature request is approved, would you be willing to submit a PR?
Yes, most likely happy to submit a PR once I understand the scope of the problem, but a quick review before accepting the PR is advised. Also a little new to Unit Testing
Context
Plain and simple; polymorphic types don't play nicely with the existing
RunAtom<T>
feature. Not to say they don't play nicely, but in cases where you want aList<MyInheritedType
, the entire list is returned as the base class, potentially meaning the loss of all of the fields on that object.Alternatives
None afaik, other than manually parsing a JObject, and writing a custom serializer to include the type discriminator manually. The best easiest method is using the
TypeNameHandling.All
argument with the JSON serializer, although this is cited as a potential security risk. Alternatively, the discriminator can be handled manually by RethinkDB and the possibility of ensuring that the discriminator matches the base type of the argument.If the feature request is approved, would you be willing to submit a PR?
Yes, most likely happy to submit a PR once I understand the scope of the problem, but a quick review before accepting the PR is advised. Also a little new to Unit Testing