Index field names not generated as column names

0 votes
asked Sep 21, 2017 in Bug report by ddegentesh (150 points)

Symfony3 framework, Doctrine2 ORM.

When exporting Entities that contain an constraint, the columns field in the Table annotation is populated with entity property names, not DB column names. This causes an error if the property names are camelCase and the column names are underscore_case.

In other words, this:

 @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="sns_recip", columns={"snsNotificationId","snsRecipient"})})

should be this:

@ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="sns_recip", columns={"sns_notification_id","sns_recipient"})})

1 Answer

0 votes
answered Sep 21, 2017 by ludek.vodicka Skipper developer (140,450 points)
selected Sep 21, 2017 by ddegentesh
 
Best answer

Thanks for info. We will check it.

commented Sep 21, 2017 by ludek.vodicka Skipper developer (140,450 points)

Can you please check if you have a correctly configured naming strategy based on this change: https://support.skipper18.com/2727/is-it-possible-to-set-doctrine-orm-naming-strategy-globally

?

commented Sep 21, 2017 by ddegentesh (150 points)

That worked. I didn't realize that was required to be set. Thank you.

...