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.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 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.Compiler1.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.Compiler1.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's gravatar image

ara
395868791

I really need an urgent fix. When available, could you please publish a build? Thank you!

(Feb 15 '11 at 04:04) ara ara's gravatar image

I'm going to investigate the issue shortly. Updated binaries will be available ASAP.

(Feb 15 '11 at 04:20) Alexis Kochetov Alexis%20Kochetov's gravatar image
1

Spassibo, Alexis.

(Feb 15 '11 at 04:21) ara ara's gravatar image

Hi Alexis, Any update on this? Sorry to push you, but it's really urgent.

(Feb 16 '11 at 21:41) ara ara's gravatar image

The question has been closed for the following reason "The question is answered, right answer was accepted" by ara Feb 18 '11 at 19:37


One Answer:

The issue has been resolved. Updated binaries will be available tonight.

answered Feb 17 '11 at 07:52

Alexis%20Kochetov's gravatar image

Alexis Kochetov
1414

The issue is fixed in the latest build.

(Feb 18 '11 at 00:50) Alex Yakunin Alex%20Yakunin's gravatar image

powered by OSQA