This sounds like you have "doctrine.orm.validator.unique" in your service definitions, where it should be "%doctrine.orm.validator.unique%".
Or the parameter "doctrine.orm.validator.unique" doesn't exist, but I would expect a configuration error (not an autoloader error) -- Jasper N. Brouwer (@jaspernbrouwer) On 3 December 2014 at 15:12:28, Cuong Nguyen ([email protected]) wrote: > Hi all, > My project using Phalcon & Doctrine, i try to make the field is unique in > entity, and when i save it throw the Fatal error Class > 'doctrine.orm.validator.unique' not found. > > namespace CMS\Entity; > > use Doctrine\ORM\Mapping\Entity; > use Doctrine\ORM\Mapping\Table; > use Doctrine\ORM\Mapping\Column; > use Doctrine\ORM\Mapping\OneToOne; > use Doctrine\ORM\Mapping\ManyToMany; > use Doctrine\ORM\Mapping\JoinColumn; > use Doctrine\ORM\Mapping\JoinTable; > use Doctrine\Common\Collections\ArrayCollection; > > use Symfony\Component\Validator\Constraints as Assert; > use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; > > /** > * @Entity > * @Table(name="ACCOUNT") > * @UniqueEntity(fields="username", message="Username is already in use") > */ > class AccountEntity extends LockableEntity { > > /** > * @Column(name="USERNAME", type="string", length=45, unique=true) > * @Assert\NotBlank > * @Assert\Length(min=4, max=45) > */ > private $username; > ... > > Hope somebody hep to to solve that problem > Thank you > Brian -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
