BUMP! Can anyone shed any light?
On Feb 22, 4:48 pm, sianabanana <[email protected]> wrote: > I have a stored procedure i would like to run to popoulate my entity. > > IQuery iq = session.CreateSQLQuery("exec myStoredProcedure") > .AddEntity("s", typeof(Shop)) > .AddJoin("t", "s.Types"); > > var test = iq.List<Shop>(); > > I have written this stored procedure to get around an N+1 problem with > Paging. > > Shop has a Many to Many relationship with Type. > > If i remove theAddJoinand select shop.* from my stored procedure, > then my shop entity loads up, but obviouly doesnt eager load the > types. > > I think i need to use theAddJoinmethod to eager load my types but > cant seem to get it right. > > I selected > ----- shop.*, shopTypes.*, types.* > ----- shop.*, types.* > > but nothing seems to work. > > I have even written the hql for this, and then added the selection > columns from this, but still it doesnt work. > > Any ideas??? -- 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.
