-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Windows 7, latest code from github
If you get an error like this:
MongoDB.Bson.BsonSerializationException: Duplicate element name 'EntryId' in class 'LoopLib.Common.LogEntry'
It might not have nothing to do with "EntryId". It's due to a duplicate BsonElement name anywhere in the
class, not necessarily on that field.
For example, I had something like this:
[BsonId]
public Guid EntryId
[BsonElement("a")]
public int A { get; set; }
[BsonElement("a")]
public int B
For people who are renaming their fields to save storage space, this will be a common mistake.