I am using NHibernate with Lambda Extensions and I can not figure out how a particular type of query is the phrase is.
My application lets users tag other users in pictures. Therefore there are image objects, and each image contains one or more tag objects, and each tag object has a user object.
Looking at the search string I am implementing a search feature, I want to return all the pictures that have the or string in its name, which has the user There is no tag with string.
I do not know how to gather this query, or do I need to do it with subqueries or aliases, what would be the proper way to do this?
I do not know in length, but you can use it to search the nickname on the archive?
session.CreateCriteria & lt; Picture & gt; () .CreateAlias ("tag", "tag") Add (Expression.or (Expression.Eq ("name", "word"), expression.ec ("tags.User.Name", "word")));
Comments
Post a Comment