Listing 31.7. Wstawianie powiązanych rekordów Piotr i Nic ważnego
$User = new User();
$User->setName('Piotr');
$manager->persist($User);

$Profil = new Profil();
$Profil->setInfo('Nic ważnego');
$manager->persist($Profil);

$User->setProfil($Profil);

$manager->flush();