Setter sur une primary key de type string
Bonjour je veux faire un setter sur la clés primaire de mon entité pour cela j'ai mis dans l'entity
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| /**
* Set logicielId
*
* @param string $logicielId
*/
public function setLogicielId($logicielId)
{
$this->logicielId=$logicielId;
}
/**
* Get logicielId
*
* @return string
*/
public function getLogicielId()
{
return $this->logicielId;
}
puis pour l'utilser j'ai mis
$logiciel->setLogicielId ('totoottototo') ; |
mais on dirait que sa ne marche pas
Citation:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'
on dirait que la fonction n'existe pas pour Symfony2 ?
Merci :oops: