I have an ad hoc object type, CombinedData and a T-SQL query that fetches
the right data. I want to load a list of the CombinedData objects from the
results of the query.
The column names in the result set do not exactly match the Object field
names.
So far I have...
ISQLQuery Query = myDB.Session.CreateSQLQuery(SQL);
ICollection<CombinedData> coll = Query.List<CombinedData>();
This fails miserably because:
1. it seems to be fetching ALL the data from the database (not lazy
loading)
2. it crashes because whatever the hell is coming back, it's not a
"CombinedData" type.
Here's what I want.
I want to get this Massive, ugly query (SQL) to push back an IENUMERABLE,
that I can then add my WHERE and ORDERBY clauses to, so that I can databind
it to a grid.
I have googled for this and found NO EXAMPLES.
There is some chat about AddEntity, but I have no idea what that does.
There is some chat about SetResultTransformer but no examples of
implementing the interface.
I am exceedingly new to NHibernate, so if you're gonna RTFM me, tell me
where the FM is that shows examples how to get there from here.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.