This is the code, and i want to set condition on obtainedMarks. The condition will check if the obtainedMarks have a value assigned or not.
$qb->select(array(
"academic.studentAcademicId as studentAcademicId",
"academic.descriptions as descriptions",
"student.name as studentName",
"student.studentId as studentId",
"class.name as className",
"session.name as sessionName",
***"SUM(marks.marksObtained) as marksObtained",***
))
->from('Application\Entity\StudentAcademics','academic')
->leftJoin('academic.class','class')
->leftJoin('academic.marks','marks')
->leftJoin('academic.student','student')
->leftJoin('academic.session','session')
->where('academic.student = :student')
->setParameter('student',$studentId)->groupBy('studentAcademicId');
So how to put such a condition that checks out if obtainedMarks carry a value or not..!