Activated Joins and added functional test

- Implemented Primary Selector on QueryBuilder
    - Allow specification of primary selector
    - If no primary selector given and number of selectors > 1, throw an
      exception.