Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Slapper.AutoMapper/Slapper.AutoMapper.InternalHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private static object GetMemberValue(object member, object obj)
/// </returns>
private static InstanceKey GetCacheKey(Type type, IDictionary<string, object> properties, object parentInstance)
{
var identifierValues = GetIdentifiers(type)?.Select(id => properties[id]).DefaultIfEmpty(Guid.NewGuid()).ToArray()
var identifierValues = GetIdentifiers(type)?.Select(id => properties.ContainsKey(id) ? properties[id] : null).DefaultIfEmpty(Guid.NewGuid()).ToArray()
?? new object[] { Guid.NewGuid() };

var key = new InstanceKey(type, identifierValues, parentInstance);
Expand Down