mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
generate:entities does not translate index associations #5488
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bodograumann on GitHub (Mar 31, 2017).
Originally assigned to: @Ocramius on GitHub.
Working with indexed associations explains the usage of the
indexBykeyword.For it to work, the insertion method needs to look as follows:
Now when executing
php bin/console doctrine:generate:entities, the generated code is the same, as if noindexByclause was used:Furthermore the
getStockmethod is not generated at all.I am using the current doctrine/orm v2.5.6
@Ocramius commented on GitHub (Mar 31, 2017):
Meh, this is a detail that is up to your domain, not to the ORM... It also assumes that you are re-generating all entities, and that the getter exists on the associated entity.