Hello,
I have a table that is mapped to a class and what I want to do is pull results from that mapped table based on results from an unmapped table.
Here’s an example of what I’m trying to do:
Table Rounds (this table is mapped in my hbm config and I can query off of it fine)
Id
round
Table ActiveRounds (this is not mapped)
Id
Active round
I want to get all of the entries from the Rounds table, were the round is an active round.
The sql for this is
Select * from Rounds a inner join ActiveRounds b on a.id=b.id and a.round=b.active_round
Do I have to map ActiveRounds to a class to do this query? This post from a year ago:
http://forum.hibernate.org/viewtopic.ph ... 5af7f955bd
Said to use theta style joins and HQL But when I do:
From Rounds rounds, ActiveRounds activeRounds where rounds.id = activeRounds.id and rounds.round = activeRounds.activeRound
I get org.hibernate.hql.ast.QuerySyntaxException: ActiveRounds is not mapped
Thanks!