Oro\Bundle\SegmentBundle\Entity\Segment:
    constraints:
        - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
            fields: [ name ]
            message: "Segment name already in use"
        - Oro\Bundle\QueryDesignerBundle\Validator\Constraints\QueryConstraint: ~
    properties:
        name:
            - NotBlank:     ~
            - Length:
                max: 255
        type:
            - NotBlank:     ~
        entity:
            - NotBlank:     ~
            - Length:
                max: 255
        organization:
            - NotBlank: ~
