This is a migrated thread and some comments may be shown as answers.

Using a Join Directly is currently not supported

7 Answers 194 Views
LINQ (LINQ specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hessner
Top achievements
Rank 2
Hessner asked on 30 Jun 2009, 09:42 PM
Hi,

I am moving my last LINQ2SQL source bits to OpenAccess, can you "fix" my join problem?

var query = (from u in Os.Extent<ORM.User>()  
             join u1 in Os.Extent<ORM.UserRole>().Where(wherePart) on u.UserID equals u1.UserID  
             join r in Os.Extent<ORM.Role>().Where(roles) on u1.RoleID equals r.RoleID  
             orderby u.FuldeNavn.ToLower()  
             select new 
               {  
               id = u.UserID,  
               u.Email,  
               Navn = u.FuldeNavn,  
               Rolle = r.Beskrivelse  
               }).Distinct(); 

I got the "Using a Join Directly is currently not support" on the first join.

Regards,
Bo Hessner

7 Answers, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 01 Jul 2009, 02:32 PM
Hello Bo,

we will provide support for joins in the near future, this feature is important for you and us!

In the mean time you might want consider using an object reference if that is possible for you.
I think in your example the UserRole class could have a User reference and a Role reference.
The query would then be for the moment:

var query1 = (from ur in Os.Extent<ORM.UserRole>() 
               select new
               { 
                 id = ur.User.UserID, 
                 email = ur.User.Email, 
                 Navn = ur.User.FuldeNavn, 
                 Rolle = ur.Role.Beskrivelse 
               }).Distinct().ToList();
var ordered = (from q in query1 orderby Navn.ToLower() select q);

Sincerely yours,
Thomas
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Hessner
Top achievements
Rank 2
answered on 01 Jul 2009, 05:08 PM
Thanks for the suggested solution - can we expect "Join" in Q2-2009?
0
Peter Brunner
Telerik team
answered on 01 Jul 2009, 05:17 PM
Hi Bo,

we will work on it right after Q2 for which we have freezed code already. So please expect it soon after.

Greetings,
Peter Brunner
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Hessner
Top achievements
Rank 2
answered on 26 Jul 2009, 07:04 PM
Any news on this?
0
Accepted
Dimitar Kapitanov
Telerik team
answered on 27 Jul 2009, 03:31 PM
Hello Hessner,
We are working on that right now. When we have it in the product we will notify you.

Best wishes,
Dimitar Kapitanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
richardFlow
Top achievements
Rank 1
answered on 09 Nov 2009, 09:36 PM
Did this get fixed in Q3 yet?

Richard
0
PetarP
Telerik team
answered on 10 Nov 2009, 08:44 AM
Hello Web Belief Ltd,

Yes, the Q3 release contains join support for LINQ. You could find some join samples in the Linq Examples application distributed with the product.

All the best,
Petar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
LINQ (LINQ specific questions)
Asked by
Hessner
Top achievements
Rank 2
Answers by
Thomas
Telerik team
Hessner
Top achievements
Rank 2
Peter Brunner
Telerik team
Dimitar Kapitanov
Telerik team
richardFlow
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or