Is it possible to set up a ManyToOne association without JPA creating a foreign key in the database?
The tables are owned by another system and are populated asynchr
The fact that ConstraintMode.NO_CONSTRAINT is ignored looks like a bug in Hibernate 4 due to be fixed in 5.
https://hibernate.atlassian.net/browse/HHH-8805
The comments on that and indeed this post here:
Multiple relationships with single mapping table without generating foreign keys by Hibernate
suggest adding the deprecated (hibernate rather than JPA) annotation
@ForeignKey( name = "none" )
to the relationship should work.