Hello,

I am using NHibernate 2.1.2 (needed a .Net 2.0 compliant version).  If
I have a query that looks something like:

IQuery iq = querySession.CreateQuery("from RptDocumentBase src where
contains(src.Body, 'florida')>0")
ICollection<RptDocumentBase> col = iq.List<RptDocumentBase>();

... it returns me a nice collection of RptDocumentBase objects.  My
problem is that because I had to move back to NHibernate 2.1.2, I no
longer have column lazy loading, so I needed to remove mappings for my
BLOB column (Body).  As such, the above query fails because there is
no mapping for src.Body.  I could change my query to something like:

IQuery iq = querySession.CreateSQLQuery("select * from
rpt_document_base src where contains(src.body, 'florida')>0")
ICollection col = iq.List();

This will return a collection of objects, each object being an
object[] of row values.  I don't want that though. What I need is to
be able to query against my blob column (my non-mapped "body" field)
and have NHibernate return a collection of RptDocumentBase objects
(like in the first query).

Does anyone know if it is possible to perform a query on a field that
NHibernate knows nothing about (from a mapping perspective) and return
NHibernate objects rather than a collection of generic objects?

Any thoughts would be greatly appreciated - 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.

Reply via email to