Answer the question
In order to leave comments, you need to log in
How to make entity without id symfony?
/**
* @ORM\Entity
* @ORM\Table(name="settings")
*/
class SettingsEntity
{
/**
* @Assert\NotBlank()
* @ORM\Column(name="key", type="string", length=255)
*/
public $key;
/**
* @Assert\NotBlank()
* @ORM\Column(name="value", type="text")
*/
public $value;
}
No identifier/primary key specified for Entity "AdminBundle\Entity\SettingsEntity". Every Entity must have an identifier/primary key.
Answer the question
In order to leave comments, you need to log in
RTFM . The phrase "Every entity class must have an identifier/primary key" seems to hint.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question