Thanks! That looks like what I needed, i'm using that same query and just returning an IList...
On Aug 9, 8:59 am, Diego Mijelshon <[email protected]> wrote: > You can use ISQLQueries with AddScalar or transformers... > checkhttp://nhforge.org/doc/nh/en/index.html#querysql-creating > <http://nhforge.org/doc/nh/en/index.html#querysql-creating>But you are not > gonna get much out of NHibernate when using it that way. > > Diego > > > > On Mon, Aug 9, 2010 at 10:06, MattO <[email protected]> wrote: > > I'm attempting to convert my data access layer from using primarily > > datasets to nHibernate and I've run into a hurdle. > > > We have many cases where the result set does not map to a business > > object such as the following SQL statement: > > > SELECT Row_Number() OVER (ORDER BY > > ContentCode,ItemNumber,ItemRevisionLevel) as RowNumber, > > RecordID,Row_Number() OVER (ORDER BY > > ContentCode,ItemNumber,ItemRevisionLevel) as Position from Items where > > ty...@examtype > > > It is easy to make a business object for "Item" which is great. But I > > have no idea how to tell nHibernate to return the RowNumber and > > Position fields in this query. > > > Also rather then retrieving all 50 fields from my Items table, is it > > possible to tell nHibernate to just return the three fields > > (RowNumber, RecordID, and Position) as shown in the above query? > > > How? > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
