-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Version
ver 5.0.16
Describe the bug
public class Package {
[BsonRef()]
public Package Parent{get;set;}
public List<Package>Childs {get;set;}
}
Code to Reproduce
var col= db.GetCollection();//error here
Expected behavior
code execute pass
Screenshots/Stacktrace
Additional context
This problem is caused by circular references. But reasonable citations should often be allowed. For example, father and son. But I believe this kind of reference should have some exit mechanism. For example: parent node, child node must be finite. Therefore, I suggest a limit on the number that can be used with the Attribute token exit mechanism. For example: increase the reference depth for the specified field:
BsonRef(limit=1024)