This code:

var s1 = session.Query.All<MyEntity>().Select(a => new { T1 = a.Text, T2 = a.Text });
var s2 = session.Query.All<MyEntity>().Select(a => new { T1 = a.Text, T2 = a.Text });

var s3 = s1.Concat(s2);
var sss = s3.ToArray();

same bug for this:

        var q1 = from q in Query.All<RegEntity>() select new { q.Id, q };
        var q2 = from q in Query.All<RegEntity>() select new { q.Id, q };
        var un = q1.Concat(q2);
        var un2 = q1.Union(q2);

Raises exception: System.ArgumentException occurred

  Message=An item with the same key has already been added.
  Source=mscorlib
  StackTrace:
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Xtensive.Storage.Rse.ColumnCollection.Initialize() in c:\Projects\dataobjects.net\Xtensive.Orm\Xtensive.Orm\Storage\Rse\ColumnCollection.cs:line 43
  InnerException:

asked Nov 08 '11 at 09:57

pil0t's gravatar image

pil0t
207575763

edited May 26 '15 at 03:09


One Answer:

Hello pil0t.

Yes it is quite old bug. I've created issue but I can't give you any predictions about version when it will be fixed.

answered May 27 '15 at 09:01

Alexey%20Kulakov's gravatar image

Alexey Kulakov
60715

edited May 27 '15 at 09:03

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA