nhibernate « Fetch « JPA Q&A





1. NHibernate: What are the options for fetching multiple entities in one query?    stackoverflow.com

The NHibernate Book discusses very briefly queries that fetch several queries at the same time. They only show how to do this with the native CreateSQLQuery command. ...

2. How can I write an HQL to fetch this?    stackoverflow.com

I have a class called Continent and Country. Continent class has Country collection:

    private ISet<Country> _countries;
    public virtual ISet<Country> Countries
    {
   ...

3. Join Fetch: "query specified join fetching, but the owner of the fetched association was     stackoverflow.com

I have the following Model Activity with the language-depending property Title. The language-dependency is defined with two additional entities Translation (Title is of this type, many-to-one) and TranslationValue (one-to-many). If I write ...

4. NHibernate - fetching with futures    stackoverflow.com

I have this Fluent NHibernate mapping:

public LossMap()
{
    Table("losses");
    Id(x => x.Id).Column("id");
    References(x => x.Policy).Column("pol_id");
    HasMany(x => x.Statuses).KeyColumn("loss_id").Cascade.All().Inverse();
   ...

5. NHibernate SELECT N+1 despite using HQL query with eager fetch    stackoverflow.com

I am experiencing a SELECT N+1 problem with NHibernate. I therefore looked into using HQL (and even Criterias) to solve the problem. I am getting the same problem with HQL as well. ...