Querying for instances of IHasLegs throws a QueryTranslationException (inner exception: ArgumentNullException) in the following model. This only happens if you use IS.ConcreteTable apparently. Full stack trace is at the end:
[Serializable]
[HierarchyRoot(InheritanceSchema = InheritanceSchema.ConcreteTable)]
public abstract class Animal : Entity
{
[Field, Key]
public int Id { get; private set; }
protected Animal(Session session) : base(session) {}
}
public interface IHasLegs : IEntity
{
[Field]
string NumberOfLegs { get; set; }
}
public abstract class Mammal : Animal, IHasLegs
{
[Field]
public string NumberOfLegs { get; set; }
protected Mammal(Session session) : base(session) {}
}
public interface ICanRun : IHasLegs
{
}
public abstract class Cat : Animal, ICanRun {
protected Cat(Session session) : base(session) {}
[Field]
public string NumberOfLegs { get; set; }
}
public class Lion : Cat
{
public Lion(Session session) : base(session) {}
}
at Xtensive.Orm.Linq.QueryProvider.Translate[TResult](Expression expression)
at Xtensive.Orm.Linq.QueryProvider.ExecuteTResult
at System.Linq.Queryable.CountTSource
at Tests.Program.Main(String[] args) in c:\users\ara\documents\visual studio 2010\Projects\DOTests\Tests\Program.cs:line 21
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Stack trace of inner exception:
at Xtensive.Core.ArgumentValidator.EnsureArgumentNotNull(Object value, String parameterName)
at Xtensive.Sql.SqlDml.TableRef(DataTable dataTable, IEnumerable1 columnNames)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildTableQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildTypedQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildViewQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.<BuildUnionQuery>b__47(IndexInfo i)
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildUnionQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index)
at Xtensive.Storage.Providers.Sql.SqlCompiler.VisitIndex(IndexProvider provider)
at Xtensive.Storage.Rse.Compilation.Compiler
1.Compile(CompilableProvider cp)
at Xtensive.Storage.Providers.Sql.SqlCompiler.VisitAggregate(AggregateProvider provider)
at Xtensive.Storage.Rse.Compilation.Compiler1.Compile(CompilableProvider cp)
at Xtensive.Storage.Rse.Compilation.Compiler
1.Xtensive.Storage.Rse.Compilation.ICompiler.Compile(CompilableProvider provider)
at Xtensive.Storage.Rse.Compilation.CompilationService.Compile(CompilableProvider provider)
at Xtensive.Orm.Linq.Translator.TranslateTResult
at Xtensive.Orm.Linq.Translator.TranslateTResult
at Xtensive.Orm.Linq.QueryProvider.TranslateTResult
asked
Feb 14 '11 at 01:56
ara
395●87●87●91
I really need an urgent fix. When available, could you please publish a build? Thank you!
I'm going to investigate the issue shortly. Updated binaries will be available ASAP.
Spassibo, Alexis.
Hi Alexis, Any update on this? Sorry to push you, but it's really urgent.