Fugo created Bug HHH-7636
Issue Type: Bug Bug
Affects Versions: 4.1.6, 4.1.1
Assignee: Unassigned
Components: core
Created: 22/Sep/12 12:39 PM
Description:

I have got a problem with inheritance and the index name generation. As example: Multiple abstract classes, which are inherited from each other.

@Entity
public abstract class LongClassName1 implements Serializable { ... @Index(name = "externalIdIndex") String externalId; ... }

@Entity
public abstract class LongClassName2 extends LongClassName1 { ... }

@Entity
public abstract class LongClassName3 extends LongClassName2 { ... }

@Entity
public abstract class LongClassName4 extends LongClassName3 { ... }

@Entity
public class LongClassName5 { ... }
Now Hibernate generates an Index like LongClassName5LongClassName4LongClassname3LongClassname2externalIdIndex which leads to an error message like Identifier name 'LongClassName5LongClassName4LongClassname3LongClassname2externalIdIndex' is too long, as MySQL only allows 64 characters.

I've tried multiple hibernate naming strategies and also have overwritten the methods myself, but nothing has worked so far.

Environment: JBoss 7.1.1, Mysql 5.5
Project: Hibernate ORM
Priority: Minor Minor
Reporter: Fugo
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira