var q1 = s.Query.All<MyEntity>().Select(a => new { a.Text, a.Key });
var q2 = s.Query.All<AnotherEntity>().Select(a => new { a.Text, a.Key });

var union = q1.Union(q2);

foreach (var item in union)
    Console.WriteLine("{0}, {1}", item.Text, item.Key.Format());

in this example all keys is formated as MyEntity keys

asked May 11 '12 at 06:45

pil0t's gravatar image


Bug is confirmed. Current implementation of key materialization does not use type information from the database. Instead it relies on type information inferred from the query. This behaviour leaves no chance to create different keys in your scenario.

(May 12 '12 at 04:29) Denis Krjuchkov Denis%20Krjuchkov's gravatar image
Be the first one to answer this question!
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