SetEntity is trying to set a parameter, which you don't have. The correct method is AddEntity, it does exist! See ISQLQuery.
RP On Friday, June 14, 2013 3:21:35 PM UTC+1, Kalev Rebane wrote: > > > FROM: > https://github.com/nhibernate/nhibernate-core/tree/3.3.x > NHibernate.Test.SQLLoaderTest.. > > session.CreateSQLQuery("select {category.*} from Category {category}") > .AddEntity("category", typeof(Category)).List(); > > > PS. There is no such Method, as AddEntity, so I used the only close-one > SetEntity > > var ss = session.CreateSQLQuery("select {lbl.*} From Label {lbl}") > .SetEntity("lbl", typeof(Label)); > > *Argument Exception: > **Parameter lbl does not exist as a named parameter in [select {lbl.*} > From Label {lbl}]* > > -- 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/groups/opt_out.
