public function getQuestionnaireDetails($userSessionId)
    {
        $questionnaire = $this->createQueryBuilder('us')
            ->select('us, c, a')
            ->leftJoin('us.configuration', 'c')
            ->leftJoin('s.answers', 'a')
            ->where('us.id = :id')
            ->setParameter('id', $userSessionId)
            ->getQuery()
            ->getOneOrNullResult();

        return $questionnaire;
    }
public function getQuestionnaireDetails($userSessionId)
    {
        $questionnaire = $this->createQueryBuilder('us')
            ->select('us, c, a')
            ->leftJoin('us.configuration', 'c')
            ->leftJoin('s.answers', 'a')
            ->where('us.id = :id')
            ->setParameter('id', $userSessionId)
            ->getQuery()
            ->getOneOrNullResult();

        return $questionnaire;
    }
public function getQuestionnaireDetails ( $ userSessionId ) { $ questionnaire = $ this -> createQueryBuilder ( 'us' ) -> select ( 'us, c, a' ) -> leftJoin ( 'us.configuration' , 'c' ) -> leftJoin ( 's.answers' , 'a' ) -> where ( 'us.id = :id' ) -> setParameter ( 'id' , $ userSessionId ) -> getQuery ( ) -> getOneOrNullResult ( ) ; return $ questionnaire ; }
Get questionnaire details

@param integer $userSessionId

@return mixed
Get questionnaire details