I have two entities // All details has been removed
@Entity
@Table(name = "A_TABLE_NAME")
public class AEntity extends ... {
...
@ManyToOne(fetch = FetchType.LAZY)
private BEntity b;
...
}
@Entity
@Table(name = "B_TABLE_NAME")
public class BEntity extends ... {
...
}
When I start tomcat server in table creation\alter time(I use code-first conception) I have error
ERROR: Unsuccessful: create table A_TABLE_NAME_B_TABLE_NAME (…)
ERROR: ORA-00972: identifier is too long
As I know ManyToOne relation can be stored as column in A_TABLE_NAME table. Why Hibernate trying to create table to store this relation(like this is ManyToMany relation) ?
@ManyToOnedoesn’t generate an extra table unless you specify a@JoinTableannotation, so I assume that the problem is somewhere on the details you ommited