14
I need to join two JPA entities on a property when there is no FK/PK relation between the two. I am using Hibernate and can use HQL query like this
select foo, bar from FooEntity as foo, BarEntity as bar
where foo.someothercol = 'foo' and foo.somecol = bar.somecol
However, I want to avoid dependency on Hibernate and use EntityManager instead. Please help.