Hello,
I´d like to create a simple join between 2 table (classes).
I want to use the "criteria query API":
Code:
public class1{
int id1;
string name1;
}
public class2{
int id2;
string name2;
}
//the tables in the db are exactly the same
When I use native SQL, the statement looks like this:
Select class1.*, class2.* from class1,class2 where
class1.id1 = 1 and
class1.id1 = class2.id2
How could I create this statement with the QueryAPI ?
Do I have put some additional lines in the mapping file ?
I´ve tried the Example at Chapter 12.4 Associations, but i´ve got an error in the CreateCriteria("Kittens - (here class2") :
Could not found class "class2" ?
Please can someone give me a simple example and some hints, to solve my problem and to make the first steps easier ...
Thanks a lot,
Slowhand