Hi, I'm trying to join two tables in a basic way this is what I am trying to get:
SELECT *
FROM Employee e, Sample s
I tried to find resources online on how to use nhibernate when joining tables and I'm trying to use the criteria API but it doesn't work. Any idea what the code would be for a basic join like this?
I tried session.creatCriteria(typeOf(Employee)).createCriteria(typeOf(Sample)).list();
The trouble I'm having is in the second createCriteria method, I've tried just about everything. I can get it to work with just a single criteria though.
By the way, I dont want to use the native query approach I want to use the criteria api for this. Thanks.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html