79165546

Date: 2024-11-07 08:25:58
Score: 3
Natty:
Report link

Both columns need to be specified as Join Columns. Consider:

@ElementCollection
@CollectionTable(
  name = "person_location",
  joinColumns = { 
     @JoinColumn(name = "person_id"),
     @JoinColumn(name = "location_id")
  }
)
...

Please post more details in JPA form, so that a tested answer is possible.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please post
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: N Sarj