Hi,

I am planning to migrate from Nhibernate 2.x to NH3 and as part of it
we are also looking at moving away from NHibernate linq (contrib
project) to the inbuilt linq and query over options.

I understand that QueryOveris a wrapper on top of the criteria and
hence shares almost the same restrictions. The current code our
application contains has a method like the following  (the Expression
is from the namespace System.Linq.Expressions)

public IList<T> FindByCriteria( IList<Expression<Func<T, bool>>>
criteria,
                                             int firstResult,
                                             int maxResult,
 
IDictionary<Expression<Func<T, object>>, string> sorter = null)

the code internally applies each criteria on the query and get the
desired objects.

The issue with QueryOverand also criteria is that we can not (by
default) handle nested objects without creating an alias or
JoinQueryOver

Given 2 objects
Person {id, name, age, address, comments [IList<comment>]} and comment
{id, personid, comment} we can add a criteria similar to
(person=>person.age>50) in both QueryOver and the linq contrib

Is there a way in QueryOver wherein we can dynamically do the
JoinQueryOver i.e
(person=>person.comments.Any(c=>c.comment.contains("abc")))


Thanks for your thoughts and comments,
~Vikas

-- 
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