Hibernate version: 3.1
Name and version of the database you are using: Oracle 10g
We use Hibernate in our application and now we need to cross data from a table with itself. In other words, we need to do queries that support multiple aliases for a single class, as the following exemple:
"select classAA.classB.seq and classAA.classB.data from ClassA classAA, ClassA classAB, ClassB classB where classAB.classB.data = ..."
Anyway, the example isn't meant to be a real query but it's meant to demonstrate that we both need to adress the problem of two or more aliases for a single table in a single query and the one-to-many relation between some classes.
We belive that HQL doesn't support multiple aliases for a table in a query and we tried to use SQL with hibernate, but unless we use pure SQL the query won't work.
Whenever I try to use the Hibernate Placeholders inside the SQL I get either StackOverflowErrors or errors indicating that no properties classB.seq exist for table with alias classAA.
So, I really need ideas on how to resolve this problem.
_________________ Falci - Heavy Worker!
|