1
Vote

Issue with empty lists

description

Hi,
 
first of all: I tested Lounge Repo with one of my small prototype projects and the ease of use and overall concept is amazing!
 
Unfortunately I came across the following issue:
  • my objects have a auto property "public IList<T> myList {get; set;}"
  • in the constructor I initialized it like this: "myList = new List<T>();" (in order to have a valid list everytime and do not have to check for null references...)
  • this works fine with Lounge Repo storing and loading when the lists are filled with objects during runtime but if more than one of my object's lists retain empty I get the following error in
    LoungeRepo.Normalizer.ObjectGraphNormalizer.RegisterNormalizedObjectForFutureReferences(...) "Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt."
     
    A possible solution that works in my example would be to "lazy" initialize the lists on first use (but this means changing my existing code due to storage engine issues... :-( ).
    Is this a "known limitation", bug or is anything wrong with my code?
     
    regards,
    Sebastian Peter

comments