Open pmatrosov opened 1 year ago
Can you explain what you expect to happen here?
I expect no exception when using RequireExplicitMapping=true (I don't understand why it has an effect?) and unlimited nesting depth of Source class instance. All Source objects are unique in my case.
I've also just come across this issue. When RequireExplicitMapping is true a stack overflow exception occurs with a circular reference during compile. The only solution is to use MaxDepth in your mapper because PreserveReference(true) has no effect.
It took me a while to figure this out because it doesn't appear to be documented that circular references are an issue when RequireExplicitMapping = true and it didn't seem like I was in a situation that would require MaxDepth.
I would much prefer to not have to use MaxDepth when RequireExplicitMapping = true.
Hi! This code generates StackOverlowException while calling method Compile() on versions 7.2.0 , 7.3.0 and 7.4-pre:
I found two workarounds to avoid this problem:
But both solutions are not suitable for me. Is this behavior a bug and how else can it be avoided?