Jack,
Thanks for the reply. I am not sure what you are pointing out,
however. Your example is basically the one I have listed in my second
comment. The point of my problem is that I cannot use a CreateQuery
where I list "src.Body", as I no longer have a Body property in my
NHibernate domain object. I used to have one, but I can't anymore.
Because of that I need a way to create a query that allows me to use
straight SQL but get NHibernate objects back. This probably means I
have to use the CreateSQLQuery API. I was plaing with the AddEntity /
AddJoin methods like:
sql.Append("select * from iceberg.rpt_document_base src where
src.doc_core_id in (select srcc.doc_core_id from
iceberg.rpt_document_core srcc where contains(srcc.body,
'bombing')>0)");
IQuery iq = ses.CreateSQLQuery(sql.ToString())
.AddEntity("src", typeof
(RptDocumentBase))
.AddJoin("srcc", "src.RptDocumentCore")
.AddEntity("srcc", typeof
(RptDocumentCore));
But this and other iterations simply give me the error
System.IndexOutOfRabgeException: Unable to find specified column in
result set. Seems like that type of query is what I am looking for
but I just can't find the right way to use it.
- Peter
--
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.