Here is my HQL:
Code:
SELECT ti.Number, tei.Date FROM TransactionInfo ti LEFT JOIN TransactionStateInfo tei ON ti.Id = tei.TransactionId
I tried with and without "ON", same result.
My entity class is:
Code:
class TransactionInfo
{
int Id;
long Number;
....
}
class TransactionStateInfo
{
DateTime Date;
int TransactionId;
....
}
The reason why i didn't do a <many-to-one> between TransactionInfo and TransactionStateInfo is that I want to load separetely "transactions" and their "transactionStates" :
- MyServices.GetTransactionById( .... )
- MyServices.GetTransactionStateByTransactionId( ... )