Using a Join Directly is currently not supported

8 posts, 1 answers
  1. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 30 Jun 2009 Link to this post

    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
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 01 Jul 2009 Link to this post

    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.
  3. DevCraft banner
  4. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 01 Jul 2009 Link to this post

    Thanks for the suggested solution - can we expect "Join" in Q2-2009?
  5. Peter Brunner
    Admin
    Peter Brunner avatar
    89 posts

    Posted 01 Jul 2009 Link to this post

    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.
  6. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 26 Jul 2009 Link to this post

    Any news on this?
  7. Answer
    Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 27 Jul 2009 Link to this post

    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.
  8. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 09 Nov 2009 Link to this post

    Did this get fixed in Q3 yet?

    Richard
  9. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 10 Nov 2009 Link to this post

    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.
Back to Top
DevCraft banner