I'm trying to specify foreign-key names. This helps to reduce the effort on db schema comparison at the end of development, to prepare the schema upgrade script.
Actually it works very well on most relationships but I can't find the solution for JoinTables.
Here is an example of User class containing a collection of Group
@JoinTable(name = "iam_user_groups",
The SchemaTool and DN doesn't seem to care about the foreignKey = @ForeignKey(name="fk_user_groups" and still generate iam_user_groups_fk1.
Am I wrong in the mapping definition or is it not yet supported by Datanucleus. (I haven't seen restriction in the JPA specification.)