0 votes

Hello,

I have two entities in which I have created a Unique Constraint index. One table has a field called emailAccount . When I export to ORM and doctrine imports the Entity it creates the column as email_account. When the Annotations are created I get the following line

  • @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="TenantUniqueEmail", columns={"emailAddress","tenant_id","id"})})

emailAccount doesnt exist as a column name so I have to manually modify the file to state email_address. Is this expected behavior, or is there a way I can modify a config to include the table name and not the entity name?

Is this more of an issue with Doctrine?

Thanks for any help you have.

Seth

in Bug report by (140 points)

1 Answer

0 votes

Hello,

In case you need to export a different column name than the field name, you can use the "column name" property in ORM property editor.

You're experiencing this issue probably because @UniqueConstrains needs to have column list, not field liest. So you need to configure your Colum name properly.

by Skipper developer (138k points)