{"action":"created","issue":{"url":"https://api.github.com/repos/mbdavid/LiteDB/issues/236","repository_url":"https://api.github.com/repos/mbdavid/LiteDB","labels_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/236/comments","events_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/236/events","html_url":"https://github.com/mbdavid/LiteDB/issues/236","id":168494801,"number":236,"title":"LiteException: Document has more than 20 nested documents. Check for circular references (use DbRef)","user":{"login":"emrys90","id":20632855,"avatar_url":"https://avatars.githubusercontent.com/u/20632855?v=3","gravatar_id":"","url":"https://api.github.com/users/emrys90","html_url":"https://github.com/emrys90","followers_url":"https://api.github.com/users/emrys90/followers","following_url":"https://api.github.com/users/emrys90/following{/other_user}","gists_url":"https://api.github.com/users/emrys90/gists{/gist_id}","starred_url":"https://api.github.com/users/emrys90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emrys90/subscriptions","organizations_url":"https://api.github.com/users/emrys90/orgs","repos_url":"https://api.github.com/users/emrys90/repos","events_url":"https://api.github.com/users/emrys90/events{/privacy}","received_events_url":"https://api.github.com/users/emrys90/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-31T00:44:21Z","updated_at":"2016-07-31T21:41:13Z","closed_at":"2016-07-31T21:38:10Z","body":"How can I track down which insert/update is causing this error to occur? I'm not using DbRef anywhere. The stack trace and error message doesn't have any information about what model this error is for, where it is being called in my code, etc. Here's the full stack trace:\r\n\r\nLiteException: Document has more than 20 nested documents. Check for circular references (use DbRef)\r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeDictionary (System.Type type, IDictionary dict, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.SerializeObject (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.Serialize (System.Type type, System.Object obj, Int32 depth) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.ToDocument (System.Type type, System.Object entity) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.BsonMapper.ToDocument[Model] (.Model entity) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.LiteCollection`1[Model].<Update>b__45_0 (.Model x) [0x00000] in <filename unknown>:0 \r\n  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[Model,LiteDB.BsonDocument].MoveNext () [0x00000] in <filename unknown>:0 \r\n  at LiteDB.DbEngine+<>c__DisplayClass20_0.<Update>b__0 (LiteDB.CollectionPage col) [0x00000] in <filename unknown>:0 \r\n  at LiteDB.DbEngine.WriteTransaction[Int32] (System.String colName, Boolean addIfNotExists, System.Func`2 action) [0x00000] in <filename unknown>:0 "},"comment":{"url":"https://api.github.com/repos/mbdavid/LiteDB/issues/comments/236458400","html_url":"https://github.com/mbdavid/LiteDB/issues/236#issuecomment-236458400","issue_url":"https://api.github.com/repos/mbdavid/LiteDB/issues/236","id":236458400,"user":{"login":"emrys90","id":20632855,"avatar_url":"https://avatars.githubusercontent.com/u/20632855?v=3","gravatar_id":"","url":"https://api.github.com/users/emrys90","html_url":"https://github.com/emrys90","followers_url":"https://api.github.com/users/emrys90/followers","following_url":"https://api.github.com/users/emrys90/following{/other_user}","gists_url":"https://api.github.com/users/emrys90/gists{/gist_id}","starred_url":"https://api.github.com/users/emrys90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emrys90/subscriptions","organizations_url":"https://api.github.com/users/emrys90/orgs","repos_url":"https://api.github.com/users/emrys90/repos","events_url":"https://api.github.com/users/emrys90/events{/privacy}","received_events_url":"https://api.github.com/users/emrys90/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T21:41:13Z","updated_at":"2016-07-31T21:41:13Z","body":"Thanks"}}
{"actor":{"display_login":"emrys90"}}