Question

I'm trying to find a good documentation which states exactly, what query by example is capable of and what not.

In particular, I want to know, if query by example supports a search like the following: I want to get all Persons which have a location with a certain name.

public class Person
{
    public virtual IList<Location> Locations { get; set; }
}

public class Location
{
    public virtual string Name { get; set; }
}

Best Regards,
Oliver Hanappi

Was it helpful?

Solution

You should take a look at videos 2 and 2a of the Summer of NHibernate screencasts (link). One of these covers query by example. If you haven't already watched these videos i STRONGLY recommend them both for content and the quality of presentation.

OTHER TIPS

While not really answering the question it might help you anyway. From my experience query by example is not really useful. I'd suggest you to use either Criteria or HQL which allow much more granularity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top