nhibernate-metadata

NHibernate: Finding out if a property is mapped to a field

Is there any way to find out if a property is mapped to a field. I would like this to generate something like a "generic like search": string[] words. words = search.Split(' '); Type type = typeof(T); Disjunction disjunction = new Disjunction(); foreach (System.Reflection.PropertyInfo property in type.GetProperties(...

How to find out the key field for a nhibernate object

Say I have the following query ICriteria query = session.CreateCriteria(typeof(T)); How can I find out the key field of T so that I can add an expression like so query.Add(Expression.In(keyField, someListOfObjects.ToArray())); Any ideas? ...