Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UniqueEntityValidator in SingleTableInheritance #17962

Closed
@Nemo64

Description

@Nemo64

I have multiple kinds of entities within a single table inheritance. The UniqueEntityValidator fails in that scenario as it usesget_class($entity). It instead should use the class on which it is defined.

Example:

/** * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="discr", type="string", length=15) * @UniqueEntity(fields={"email"}) */class User {/** @ORM\Column(type="string") */private$email;}
class Collaboratorextends User {}

Validating theCollaborator will now only check for otherCollaborators with the same email.

I'm using symfony2.7.10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp