Hey,
I want to perform a join between two tables CustomerorderT and CustomerorderlineT. The thing is that I have composite keys in both tables.
Below is my select query so far, what I want to get out. I haven't formulated the WHERE statement since that's what I'm wondering about. I believe I can't use the prefix "id" since that checks after the primary keys and more important in hibernate I have the keys in a separate files (CustomerorderTPK and CustomerorderlineTPK) and they got no hbm.xml file so I can't use them in the query.
Code:
Query q = session.createQuery("SELECT co.customerorderno, co.deliverydate, co.status, co.paymentmode, co.freightcost, co.totalcost, "
+ "colT.orderlineno, colT.articleno, colT.articlename, colT.price "
+ "FROM net.sf.hibernate.CustomerorderT co, net.sf.hibernate.CustomerorderlineT colT, "
+ "WHERE ");
So how do I write my select query with a correct join?
Br. Newman