Join with multiple conditions

Thread is closed for posting
4 posts, 0 answers
  1. stavros sotirchos
    stavros sotirchos avatar
    16 posts
    Member since:
    Mar 2006

    Posted 29 Oct 2010 Link to this post

    Is it possible to do a join with multiple conditions? I have tables with multiple columns as keys and although I've tried to to join with multiple conditions I failed. Below I show some of the ways I've tried and failed with exceptions...

    Try 1

    from a in table1 
    join b in table2 on new {a.code, a.aa} equals new {b.code, b.aa}
    join c in table3 on equals
    where ....

    Try 2

    from a in table1
    from b in table2
    from c in table 3
    where a.code == b.code && a.aa == b.aa && ==

    Try 3 

    from a in table1
    from d in (  from b in table2 join c in table3 on equals select new {t1 = b, t2 = c})
    where a.code = d.t1.code && a.aa == d.t1.aa

  2. Serge
    Serge avatar
    375 posts

    Posted 03 Nov 2010 Link to this post

    Hi stavros sotirchos,

     We are experiencing some issue regarding more complex join situation such as yours. We are working on improving this. However the fix might not be included in the following release. We will add these scenarios in our test suite and work on them after the Q3 release. 

    However for the time being, can you please give us a little more insight on what you are trying to accomplish as surely this query could be split into two (or more) simpler queries that would execute. 

    I am looking forward to resolving this issue and I am sorry for any inconvenience caused.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Bassel
    Bassel avatar
    7 posts
    Member since:
    Nov 2008

    Posted 08 Feb 2011 Link to this post

    I'm using Q3 2010
    and I have the same problem
    the Composite Key Join is not working
    it give an exception when compiling says error in join clause

  4. Serge
    Serge avatar
    375 posts

    Posted 10 Feb 2011 Link to this post

    Hello Bassel,

     Could you please elaborate a bit more on you case as I cannot reproduce this behaviour at the moment. Are you using the designer and if so are you reverse mapping or just creating your model through it. 

    What is the exact message of the exception you are seeing and if there is no exception please share with us the output of the build process. If it is not too much trouble I would ask you to open a separate support thread and send us your project there so that we can further investigate this issue. 

    I am looking forward to resolving this problem. 

    Kind regards,
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Back to Top