You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a stackoverflow when using NEST to map classes which contain an IEnumerable of the same class.
I've created a test which fails demonstrating the problem.
The problem appears to be in the WriteProperties method (in Nest.Resolvers.Writers.TypeMappingWriter.cs). The deepType is added to the dictionary of seenTypes, however when newTypeMappingWriter is created using the internal constructor it's _type member is set to the result of GetUnderlyingType(deepType) the _type member is then used to check the seenTypes which returns 0 as the underlying type (in the case of an array or a generic) never make it into seenTypes.
I've reproduced the error in 1.0.0-beta1 and latest master (9612928).
The text was updated successfully, but these errors were encountered:
@sljohtmboe thanks for finding this and creating a test to reproduce 👍. The issue was that we were adding the collection type to seenTypes instead of the underlying type itself.
I'm encountering a stackoverflow when using NEST to map classes which contain an IEnumerable of the same class.
I've created a test which fails demonstrating the problem.
The problem appears to be in the WriteProperties method (in Nest.Resolvers.Writers.TypeMappingWriter.cs). The
deepType
is added to the dictionary ofseenTypes
, however whennewTypeMappingWriter
is created using the internal constructor it's_type
member is set to the result ofGetUnderlyingType(deepType)
the_type
member is then used to check theseenTypes
which returns0
as the underlying type (in the case of an array or a generic) never make it intoseenTypes
.I've reproduced the error in 1.0.0-beta1 and latest master (9612928).
The text was updated successfully, but these errors were encountered: