Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 1.02
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: SQL Server Express 2005
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi, I'm a complete newbie to NHibernate and I have this question regarding binding a oneToMany Relationship to a GridView or Repeater for that matter.
I use the standard NorthWind Database. I'm testing using the "Customers" and "Orders" table. What I want is a list of "CompanyName" from the "Customers" Table and the "OrderDate" of the companies from "Orders" table.
Normally, I would execute a sql like so
"SELECT dbo.Customers.CompanyName, dbo.Orders.OrderDate
FROM dbo.Customers LEFT OUTER JOIN
dbo.Orders ON dbo.Customers.CustomerID = dbo.Orders.CustomerID"
and bind the "CompanyName" and "OrderDate" as columns to the GridView or Repeater.
I understand how to get a List of Orderd by CustomerID, but how do you return a List of "Customers" and "Orders" so you can bind to a GridView?
I know it's a basic concept, I just have a hard time finding an example.