Anomalie #2008

Bad index generated with indexForeignKeys for a one-2-many renamed relation

Added by Tony Chemit about 1 year ago. Updated about 1 year ago.

Status:RésoluStart date:03/14/2012
Priority:NormalDue date:
Assignee:Tony Chemit% Done:

0%

Category:generationSpent 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.

History

#1 Updated by Tony Chemit about 1 year ago

  • Status changed from Assigné to Résolu

Fixed in r2420.

Also available in: Atom PDF