I know spring != jpa but maybe one of you has an idea. Is it possible to have an unidirectional one-to-many mapping between two foreign keys. Let's say I have an entity Review(id, product_id, more cols) and ProductCategory (product_id, category_id) (the two columns form the pk). Any chance to add a list of referenced ProductCategory entities to the Review entity? I already tried following mapping
@OneToMany
@JoinColumn(name = "productId", referencedColumnName = "productId")
val categories: List<ProductCategory> = emptyList()
which results in following error message
Found shared references to a collection: ...entity.Review.categories