Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Collection/Map join table column default names can be incorrect for JPA #175
The code will currently use specified column names for join table column naming correctly, however if the user has not provided any column names, then will default to (seemingly) incorrect values based on the PK column name(s) of the element/key/value.
For JDO there is no defined schema default namings, so it is not strictly speaking a bug in that case.
Note this only applies to the case of persistable element/key/value.
will result in an attempt to create a join table with column "MYMAP_ID" for the key FK and "MYMAP_ID" for the value FK.
Workaround : Specify @MapKeyColumn. Arguably this should be @mapkeyJoinColumn.