Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
NHibernate version:1.2.1
I've been struggling for quite a while now with a rather simple query; what I want to do is to write the following SQL query as a HQL query and execute it:
Quote:
SELECT T.OrderID, B.ShipName from Order_Details as T, Orders as B WHERE T.OrderID=B.OrderID
I've Looked int the HQL part of the reference documentation, searched the webb for clues and peeked at the NHibernate test code without getting much wiser. The nearest I've been to success is with:
Quote:
IQuery ODqt = session.CreateQuery("select T.orderID from OrderDetailsEntity as T, select B.shipName from OrdersEntity as B where T.orderID=B.orderID");
But with that one I'll only get shipName back and not both orderID and shipName. I'll be gratefull for any advice.