-1

Can someone please help me translate this MySQL Query to Hibernate.

select F1.FighterName, F2.FighterName
            from Fight N 
                inner join Fighter F1 on N.Fighter1=F1.idFighter
                inner join Fighter F2 on N.Fighter2=F2.idFighter

Your help shall be appreciated.

1 Answers1

0

Below HQL assumes that your Fighter has 1-N association to Fight and N-N association to itself. See following question to make many to many association to same table in hibernate.

 select F1.FighterName, F2.FighterName
 from Fighter F1 
 inner join Fighter F2 
Community
  • 1
  • 1
Atilla Ozgur
  • 14,339
  • 3
  • 49
  • 69