Есть вот такой вот код:
<?php
namespace Test\TestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="answers")
*/
class Answers{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="QuestionAnswers", inversedBy="answers")
**/
protected $questionAnswer;
/**
* @ORM\Column(type="string", length=250)
* @Assert\NotBlank()
* @Assert\MinLength(5)
* @Assert\MaxLength(250)
*/
protected $answer;
/**
* @ORM\Column(type="boolean" )
*/
protected $rightAnswer=false;}
команда:
php app/console doctrine:schema:update --force
ругается так:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@Symfony\Component\Validator\Constraints
\MinLength" in property ForaSoft\TestBundle\Entity\Answers::$answer does no
t exist, or could not be auto-loaded.
Подскажите, пожалуйста, в чем может быть проблема.