How to query related objects with nhibernate using contains
===

I'm rather new to NHibernate, so this one should be easy:

    
        public IList<Ad> Search(string query)
        {
            return unitOfWork.Session
                .QueryOver<Ad>()
                .JoinQueryOver<AdProperty>(x => x.Properties)
                    .Where(ad => ad.Value.Contains(query))
                .List();
        }

What I am trying to do, of course, is to search for Ads, where the AdProperty Contains a certain string, and pass back the corresponding Ad objects as a result. (I realize this will not result in an optimal query, but for now this will suffice)

**The problem**

I cannot use .Contains, as it is unrecognized. So how would I do this correctly with NHibernate ?

I've had a look at http://stackoverflow.com/questions/2620589/nhibernate-query-looking-for-the-related-objects-related-object, but I was unable to get that to function.

**Note**

I am using NHibernate 3.0+