Fix ClassMapping cache

pull/2/head
Harald Wolff 2019-10-08 12:15:40 +02:00
parent d17b290d9a
commit b7d83a5e3a
1 changed files with 5 additions and 3 deletions

View File

@ -108,10 +108,12 @@ namespace ln.types.odb.ng.mappings
document[fieldInfo.Name] = ov;
}
if (IsReferenceType && !forwardCache.ContainsKey(documentID))
if (IsReferenceType)
{
forwardCache.Add(documentID, value);
reverseCache.Add(value, documentID);
if (!forwardCache.ContainsKey(documentID))
forwardCache.Add(documentID, value);
if (!reverseCache.ContainsKey(value))
reverseCache.Add(value, documentID);
}
return document;