postgresql – Deconfliction join table

I have a table that gets populated by various means and I need to create a join table to deconflict the data. To do the deconfliction, we run algorythms to determine the probability ID# 1 is the same item as ID# 20.

table 1 fields

  1. ID
  2. name
  3. dimensional infromation

table 2 fields

  1. firstID (fk to ID field of table 1)
  2. secondID (fk to ID field of table 1)
  3. probability (Double)
  4. method (string)

I am trying to use hibernate to accomplish this. I have the database setup but am having issues with the mapping. If anyone has any ideas, it would be greatly appreciated.