var entities = Query.All<IMyInterface>().Where(entity => entity.PhoneNumber == "1282832");

foreach (var entity in entities)

[ArgumentNullException: Value cannot be null.
Parameter name: dataTable]
   Xtensive.Core.ArgumentValidator.EnsureArgumentNotNull(Object value, String parameterName) +83
   Xtensive.Sql.SqlDml.TableRef(DataTable dataTable, IEnumerable`1 columnNames) +35
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildTableQuery(IndexInfo index) +905
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index) +49
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildTypedQuery(IndexInfo index) +102
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index) +163
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildViewQuery(IndexInfo index) +59
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index) +138
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +238
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +472
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildUnionQuery(IndexInfo index) +118
   Xtensive.Storage.Providers.Sql.SqlCompiler.BuildProviderQuery(IndexInfo index) +71
   Xtensive.Storage.Providers.Sql.SqlCompiler.VisitIndex(IndexProvider provider) +52
   Xtensive.Storage.Rse.Compilation.Compiler`1.Compile(CompilableProvider cp) +152
   Xtensive.Storage.Providers.Sql.SqlCompiler.VisitFilter(FilterProvider provider) +68
   Xtensive.Storage.Rse.Compilation.Compiler`1.Compile(CompilableProvider cp) +509
   Xtensive.Storage.Rse.Compilation.Compiler`1.Xtensive.Storage.Rse.Compilation.ICompiler.Compile(CompilableProvider provider) +9
   Xtensive.Storage.Rse.Compilation.CompilationContext.Compile(CompilableProvider provider) +269
   Xtensive.Storage.Rse.<GetEnumerator>d__4.MoveNext() +276
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +148
   Xtensive.Core.<Batch>d__20`1.MoveNext() +841
   Xtensive.Core.<ApplyBeforeAndAfter>d__28`1.MoveNext() +213
   Xtensive.Storage.<ToTransactional>d__0`1.MoveNext() +460
   System.Linq.<SelectManyIterator>d__14`2.MoveNext() +578

Updated at 23.07.2010 9:21:13

Some specifics of my model:

All entities inherit from BusinessEntity (which inherits from Entity). BusinessEntity implements IBusinessEntity. Key field is defined on IBusinessEntity (of type long). [HierarchyRoot(InheritanceSchema.ConcreteTable)] is applied on BusinessEntity.

I am querying for type IMyInterface, and IMyInterface inherits from IBusinessEntity. There are also other interfaces that implement/inherit IMyInterface

Updated at 24.07.2010 9:51:24

Any luck?

Updated at 29.07.2010 2:36:28

Any results?

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Jul 10 '10 at 22:31

ara's gravatar image


edited Sep 06 '10 at 03:07

Alex%20Yakunin's gravatar image

Alex Yakunin

Most likely, that's a bug.

If you can provide any other details (e.g. info about types that implement this interface), it could help us to fix it faster.

(Jul 10 '10 at 22:31) Alex Yakunin Alex%20Yakunin's gravatar image

In progress, should be done today.

(Jul 10 '10 at 22:31) Alex Yakunin Alex%20Yakunin's gravatar image

The latest update (v4.3.1) already includes the fix.

(Jul 10 '10 at 22:31) Alex Yakunin Alex%20Yakunin's gravatar image

I tried in the latest release 4.3.5... still does not work.

(Sep 04 '10 at 19:34) ara ara's gravatar image

Sorry, this means this isn't fixed yet. I'll ask our guys to fix this on Monday.

(Sep 05 '10 at 05:37) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Just created: issue 797.

answered Sep 06 '10 at 02:15

Alex%20Yakunin's gravatar image

Alex Yakunin

edited Sep 06 '10 at 02:15

any update?

(Sep 15 '10 at 06:42) ara ara's gravatar image

Actually, the reported issue is already fixed (see #767). The accidentally opened issue #797 is marked as duplicate.

In case you are still having troubles with interface-based queries - let us know. It is better to provide us with a part of your domain model and an example of failing query. After that we'll reopen the #767 issue.

(Sep 15 '10 at 07:26) Alexis Kochetov Alexis%20Kochetov's gravatar image
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