object returns nil

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
skibikegolf
Posts: 2
Joined: Sat 05 Jun 2010 16:58

object returns nil

Post by skibikegolf » Wed 23 Jun 2010 13:37

I am running into null exception problems.

I have a list that contains team data, name data, gender data, and event data.

I am able to new my querries two deep. Meaning, I am able to do the following:

Code: Select all

var q = from team in TeamList
            group tm by tm.TeamData into groupByTeamData
            select new
            {
                myTeam = tm.key,
                teamGroup = from name in tm
                                    group name by name.lastName into groupByLastName
                                    select new
                                    {
                                          myName = name.key,
                                          nameGroup = groupByLastName
                                    }
             }
However, as soon as I attemp to nest 3 levels deep, I get a nil object. Here is the sample code:

Code: Select all

var q = from team in TeamList
            group tm by tm.TeamData into groupByTeamData
            select new
            {
                myTeam = tm.key,
                teamGroup = from name in tm
                                    group name by name.lastName into groupByLastName
                                    select new
                                    {
                                          myName = name.key,
                                          nameGroup = from gen into name
                                                               group gen by gen.Gender in groupByGender
                                                               select new
                                                               {
                                                                   myGen = gen.key,
                                                                   genGroup = groupByGender
                                                               }
                                    }
             }
the genGroup collection in the 3rd level of the nesting is nil.

The data is 3000 records and supports a logical nesting 3 or 4 or 5 deep. What am I doing wrong?

TIA

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 24 Jun 2010 16:01

Please give us the following information:
1) your call stack;
2) could you please send us a small test project with your model and the DDL/DML script we can reproduce the problem in our environment?
3) the version (x.xx.xxx) of your dotConnect for MySQL. You can find it in the Tools > MySQL > About menu of Visual Studio.

Post Reply