Hello, after apgrade from release 4.3.3 to release 4.6.4, we have an Exception being thrown in a simple query and here is the error details:

Query : DeliveryDetails Actualused = Xtensive.Orm.Session.Current.Query.All<DeliveryDetails>().Where(x => x.ActualQuantity != null).FirstOrDefault();

Error :
                Unable to translate 'Query.All().Where(x => (x.ActualQuantity != null)).FirstOrDefault()' expression.

Inner Error :
                {"Internal error: Source column list contains null values."}

Stack trace :
                      at Xtensive.Orm.Linq.QueryProvider.Translate[TResult](Expression expression, CompilerConfiguration compilerConfiguration)
   at Xtensive.Orm.Linq.QueryProvider.Translate[TResult](Expression expression)
   at Xtensive.Orm.Linq.QueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at Microtech.Infinity5.Web.Financial.AR.FORM_ProgramSetUp.DisableControls() in E:\Work\Application\Source Code\Microtech.Infinity5.Web\Financial\AR\FORM_ProgramSetUp.aspx.cs:line 382
   at Microtech.Infinity5.Web.Financial.AR.FORM_ProgramSetUp.OnLoad(EventArgs e) in E:\Work\Application\Source Code\Microtech.Infinity5.Web\Financial\AR\FORM_ProgramSetUp.aspx.cs:line 135
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

asked Dec 19 '13 at 06:26

ahmad%20emad's gravatar image

ahmad emad

Hello Ahmad Emad. Could you please send a domain model or a part of it to support at dataobjects dot net, so we could try reproducing the issue and fix it?

Thanks in advance.

(Dec 19 '13 at 10:53) Dmitri Maximov Dmitri%20Maximov's gravatar image

Hello Dmitri, i have sent the file to the given E-Mail

(Dec 22 '13 at 05:19) ahmad emad ahmad%20emad's gravatar image

One Answer:

Hello Ahmad Emad,

I'm not sure that the question is still actual, but there is a workaround so far: replace FirstOrDefault() with Take(1).SingleOrDefault()

Hope this helps

answered Jun 24 '14 at 23:14

Dmitri%20Maximov's gravatar image

Dmitri Maximov

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


Once you sign in you will be able to subscribe for any updates here



Asked: Dec 19 '13 at 06:26

Seen: 3,711 times

Last updated: Jun 24 '14 at 23:14

powered by OSQA