Skip to content

2.0.1 - PutMappingDescriptor.AutoMap ignores maxRecursion argument #1825

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

Closed
hmanner opened this issue Feb 11, 2016 · 3 comments
Closed

2.0.1 - PutMappingDescriptor.AutoMap ignores maxRecursion argument #1825

hmanner opened this issue Feb 11, 2016 · 3 comments

Comments

@hmanner
Copy link

hmanner commented Feb 11, 2016

I have a recursive type mapping which I create using AutoMap(..., 10). This works fine when creating the mapping during index creation via the following method:

TypeMappingDescriptor<T> AutoMap(IPropertyVisitor visitor = null, int maxRecursion = 0)

However, I also need to update the mapping dynamically (on all levels) with new fields, which I perform via this method (different class):

PutMappingDescriptor<T> AutoMap(IPropertyVisitor visitor = null, int maxRecursion = 0)

This only updates the mapping on the top level. Looks like this method ignores the maxRecursion argument, it always sends 0 to the PropertyWalker.

In my case this is a critical issue, as I am using dynamic = strict. This will cause later attempts to set the new field a few levels down in the hierarchy of a document to fail, because the type mapping contains the new field only on top level.

@gmarz
Copy link
Contributor

gmarz commented Feb 11, 2016

Hey @hmanner this is a dupe of #1821 which we've already pushed a fix for.

We'll get a 2.0.2 release out asap.

@gmarz gmarz closed this as completed Feb 11, 2016
@gmarz
Copy link
Contributor

gmarz commented Feb 11, 2016

FYI @hmanner just released 2.0.2

@hmanner
Copy link
Author

hmanner commented Feb 11, 2016

That was fast :) Sorry I missed that other issue before filing the duplicate.

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