Duplicate index name in generated DDL for @Embeddable types in Hibernate
Issue
-
An
@Embeddabletype is defined with a column index... import org.hibernate.annotations.Index; ... @Embeddable public class Title implements Serializable { @Index(name = "title_idx") private String theTitle; ... } -
The
@Embeddabletype is used in several entities (included via@Embedded) - When generating DDL, Hibernate attempts to create a database index with the same name (e.g. 'title_idx') for each entity
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
