Skip to content
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

handle map with union Map<string, DU> #4

Closed
AviAvni opened this issue Jan 4, 2018 · 5 comments
Closed

handle map with union Map<string, DU> #4

AviAvni opened this issue Jan 4, 2018 · 5 comments
Labels

Comments

@AviAvni
Copy link

AviAvni commented Jan 4, 2018

when tring to serialize map that the value is Descriminated Union there is null reference exception

@Zaid-Ajaj
Copy link
Owner

Can you elaborate with more details?

@AviAvni
Copy link
Author

AviAvni commented Jan 4, 2018

Try to deserialize value of above type with multiple value in the map

type Value = Num of int | String of string
type Entity = { Id:string: Properties:map<string, Value> }

I get exception in Bson.rewriteKey
But the serialization look ok

@AviAvni
Copy link
Author

AviAvni commented Jan 4, 2018

Great can you push the fix to nuget?

@Zaid-Ajaj
Copy link
Owner

Thanks for the details. The rewriteKey function will now ignore maps because these are not nested types.

I already pushed the fix to nuget, version 0.8.1 is now being indexed 😄

@AviAvni
Copy link
Author

AviAvni commented Jan 4, 2018

Thank you very much great job it's help me a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants