-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization errors with FindResult
, DeleteResult
on dotnet
#36
Comments
Hey there, I need some time to check this but thanks for the primer information. I haven't had a chance to use mongo in a while, so I left this library to get some age... that's on me!
It kind of makes sense if you ever share code but to be honest I guess on the fable side there are other mongo specific libraries that could be annotated to have a better DX I guess it is up to consideration if the fable target is really needed.
I don't particularly remember why... to be honest, I'm not married to anything so we can make changes in this area. Oh, nice I wasn't aware of this, this could help to fix up these kinds of issues. On a side note, are you interested in making these changes? I'd gladly accept contributions as it might take me a while to get to work on this personally; we can push a new dotnet package rather than a fable one while I think about that one. |
Hey there, thanks for replying! I didn't create a PR because I wasn't super sure how you wanted to deal with code sharing. Can't do it today, but I'll add the types to Mondocks.Net with [] and go from there? |
Yes, there's more utility in the dotnet version than the fable one, in any case we can revisit the fable package at some point if we need to but that's not a concern for now |
I just merged the PR I'll try to put out a release later today in case you're blocked! Thank you very much for this contribution! |
https://www.nuget.org/packages/Mondocks.Net/0.6.0 published, we just need to wait for NuGet to index and list the package! once again thank you! |
Running the examples in
samples/Commands
fails because the MongoDB driver expects certain fields that don't exist in aFindResult<'T>
or aUpdateResult
to actually exist.On my end, I can confirm that simply doing
resolves this (because Mongo also returns the
operationTime
field).However, it's not just this one simple fix; the update command still fails because of the same issue. My conclusion is that we'll have to add this attribute to all of the types in Mondocks.Net's
Types.fs
; it follows that it might not make sense to share the types betweenMondocks.Net
andMondocks.Fable
?Finally, a small feature request/design question: what determines which fields make it into the result structs? It would be nice, for instance, to also be able to also inspect the
upserted
items of anUpdateResult
. See output reference here.The text was updated successfully, but these errors were encountered: