Anomalie #2008
Bad index generated with indexForeignKeys for a one-2-many renamed relation
| Status: | Résolu | Start date: | 03/14/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | generation | Spent time: | - | |
| Target version: | 2.6.9 |
Description
Having this ona PollAccount entity
<bag name="pollsCreated" inverse="true" lazy="true" node="pollsCreated" embed-xml="false"> <key column="creator"/> <one-to-many class="org.chorem.pollen.business.persistence.PollImpl" node="topiaId" embed-xml="false"/> </bag>
Should obtain this :
<database-object> <create>CREATE INDEX idx_PollAccount_pollsCreated ON poll(creator)</create> <drop>DROP INDEX idx_PollAccount_pollsCreated</drop> </database-object>
but is generated :
<database-object> <create>CREATE INDEX idx_PollAccount_pollsCreated ON poll(pollAccount)</create> <drop>DROP INDEX idx_PollAccount_pollsCreated</drop> </database-object>
--> the renamed attribute creator is not well used.