I got it!
"form collections" is unnecessary.
There are 2 things, which have to be considered.
- because teacher username is unique, it must be checked at first. If teacher username exists already, just add the relationship with "addTeacher($teacherOld)", if not, using "addTeacher($teacher)"
 
- save relationship between teacher and student with $student->addTeacher($teacher);
 
public function addAction(Request $request) {
    $student = $this->container->get('security.context')->getToken()->getstudent();
$teacher = new teacher();
$form = $this->createFormBuilder($teacher)
    ->add('teacherUsername', 'text')
    ->getForm();
if($request->getMethod() == 'POST')  {
    $form->bindRequest($request);
    if($form->isValid()) {
        $em = $this->getDoctrine()->getEntityManager();
        $teacherUsername = $form->get('teacherUsername')->getData();
        // check teacherUsername exist?
        $teacherOld = $this->getDoctrine()->getRepository('PSEMainBundle:teacher')->findOneByTeacherUsername($teacherUsername);
        if ($teacherOld) {
            $student->addTeacher($teacherOld);
        } else {
            $teacher->setTeacherUsername($teacherUsername);
            $student->addTeacher($teacher);
        }
        // add relations
        $em->persist($student);
        $em->flush();
        return $this->redirect($this->generateUrl('_teacher'));
    }
}
return $this->render('PSEMainBundle:teacher:add.html.twig', array('form' => $form->createView()));}