| The foreign key should be Parent_id. This was probably not working correctly in 4.3. According to JPA 2.1 spec section, 2.10.5.2 Unidirectional ManyToMany Relationships: "... The name of this foreign key column is formed as the concatenation of the following: the name of entity A; ""; the name of the primary key column in table A. The other foreignkey column refers to table B and has the same type as the primary key of table B. The name of this foreign key column is formed as the concatenation of the following: the name of the relationship property or field of entity A; ""; the name of the primary key column in table B." The default for JoinColumn annotation is consistent. |