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

Abstract object not mapped correctly in Nest 7.0.0-alpha1 #3705

Closed
andreasnauta opened this issue Apr 29, 2019 · 3 comments
Closed

Abstract object not mapped correctly in Nest 7.0.0-alpha1 #3705

andreasnauta opened this issue Apr 29, 2019 · 3 comments

Comments

@andreasnauta
Copy link

NEST/Elasticsearch.Net version: 7.0.0-alpha1

Elasticsearch version: 7.0.0

Description of the problem including expected versus actual behavior:
See Question in Stackoverflow

Steps to reproduce:

  1. Clone repository https://github.com/andreasnauta/test-nest-7.0.0-alpha
  2. Insert ConnectionSettings
  3. Run InsertTest in 7.0.0
@russcam russcam added the Discuss label May 7, 2019
@russcam
Copy link
Contributor

russcam commented May 7, 2019

I appreciate you taking the time to open this @andreasnauta, and the tests repository, thanks!

We'll need to have a discussion amongst the team as to whether we should look to support this in 7.x's internal serializer, as it is not something currently supported in 6.x out of the box, as you have found in the tests with 6.6.0.

It is possible to support this with a discriminator field within the actor object. Json.NET supports this notion with TypeNameHandling, which we have an example of doing in the docs. You'll need to also reference the Nest.JsonNetSerializer nuget package and hook it up as the serializer to use for your documents as per the docs.

@russcam
Copy link
Contributor

russcam commented Jun 5, 2019

Upon discussion with the team, we've decided that we're not going to change how the client works to support this by default, since it's something that can be handled with custom serialization.

@russcam russcam closed this as completed Jun 5, 2019
@andreasnauta
Copy link
Author

Thank you for looking into this @russcam and thank you for the links :)

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

No branches or pull requests

2 participants