Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UniqueEntity] multiple-column #12

Open
recipe opened this issue Aug 10, 2012 · 0 comments
Open

[UniqueEntity] multiple-column #12

recipe opened this issue Aug 10, 2012 · 0 comments

Comments

@recipe
Copy link

recipe commented Aug 10, 2012

We have to provide support of UniqueEntity validation for the case when multiple-column are set @UniqueEntity(fields={"field1", "field2", "fieldN"}):

<?php
namespace Ns\SomeBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * @ORM\Entity(repositoryClass="Ns\SomeBundle\Repository\FooRepository")
 * @ORM\Table(name="foo")
 * @UniqueEntity(fields={"field1", "field2", "fieldN"})
 */
class Foo 
{
    //...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant