problems finding .PreFetch

Posts   
 
    
pkellner avatar
pkellner
User
Posts: 19
Joined: 23-Aug-2009
# Posted on: 02-Sep-2009 18:29:34   

I'm having trouble figuring out where the method .PreFetch.. comes from and why its not coming for me. I have a query like below, but the ColemanStatus90ProNumberEntity. does not yield a method PreFetch...?

Thanks

        var metaData = new LinqMetaData(adapter);

                var q = (from data in metaData.ColemanStatus90ProNumber
                        select data).WithPath(
                            new PathEdge<ColemanStatus90SummaryEntity>(
                                  ColemanStatus90ProNumberEntity.PreFetch...
                                )
                        )
                var r = q.ToList();
Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 02-Sep-2009 18:37:55   

When using PathEdges, ColemanStatus90ProNumberEntity.PrefetchPathSOMETHING will be a static property of the entity, not a method.

So if you don't have ColemanStatus90ProNumberEntity.PrefetchPathSOMETHING Then the ColemanStatus90ProNumberEntity doesn't have any relations defined with other entities.

pkellner avatar
pkellner
User
Posts: 19
Joined: 23-Aug-2009
# Posted on: 02-Sep-2009 18:55:01   

When I look in the designer, I see under CoelmanStatus90ProNumber/Relations

I see the following:

.. "http://www.peterkellner.net/misc/llbl1.png" ..

Is there something else i need to do?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 02-Sep-2009 19:52:53   

It might be that your application is referencing an old version of the generated code, where these relations where not there. Please re-generate the code and make sure your application uses the latest generated code.

pkellner avatar
pkellner
User
Posts: 19
Joined: 23-Aug-2009
# Posted on: 02-Sep-2009 20:40:23   

That did solve it. Have no idea how it could not have been there the first time I generated. I didn't change the database at all or the settings.

Strange, but thanks.