Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRE from ExpressionDispatcher.Analyzer #132

Open
GoogleCodeExporter opened this issue Apr 24, 2015 · 2 comments
Open

NRE from ExpressionDispatcher.Analyzer #132

GoogleCodeExporter opened this issue Apr 24, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

System.NullReferenceException: Object reference not set to an instance of
an object
at DbLinq.Data.Linq.Sugar.Implementation.ExpressionDispatcher.AnalyzeMember
(System.Linq.Expressions.Expression,DbLinq.Data.Linq.Sugar.BuilderContext)
[0x001f0] in
/home/scott/source/dblinq2007/src/DbLinq/Data/Linq/Sugar/Implementation/Expressi
onDispatcher.Analyzer.cs:701

There is a TODO in the code about null checking.

The query in question is:

var shirts = from p in Db.Products
    where p.DesignId == 2 && p.Category == "Shirt"
    from s in Db.Skus
    where s.ProductId == p.Id
    select s.Id;

Original issue reported on code.google.com by lunchtim...@gmail.com on 7 May 2009 at 7:11

@GoogleCodeExporter
Copy link
Author

The following code generate the same error against the Northwind DB:

            var db = CreateDB();
            var shirts = from p in db.Products
                         where p.CategoryID == 1
                         from o in db.OrderDetails
                         where o.ProductID == p.ProductID
                         select o.ProductID;
            foreach (var shirt in shirts)
                Console.WriteLine("# shirt: {0}", shirt);

Original comment by jonmpr...@gmail.com on 19 Jan 2010 at 10:42

@GoogleCodeExporter
Copy link
Author

Please, try out with the sourcecode attached. The source code contains to the 
DBlinq, dbmetal and dblinq.postgressql projects. To use this, download the 
official source, replace the correspondents folders for the attacheds and 
compile.
I was working on and testing the following issues:

Postgres Issue
34
Stored procedure Issue
238 (Actually,. this post already had a solution, but I found it before read 
this post)
Contains Issue
163
Join issues
81, 138, 179
Group issues
64, 113, 157, 158
Cast Issue
211

It'll be very good if someone else test this code!

Thanks!

Original comment by tos.oliv...@gmail.com on 1 Apr 2012 at 1:11

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant