代码之家  ›  专栏  ›  技术社区  ›  Remi Despres-Smyth

针对嵌套类的NHibernate查询

  •  2
  • Remi Despres-Smyth  · 技术社区  · 16 年前

    我用的是NHibernate。我有一个嵌套类型的类。使用NHibernate对嵌套类型进行查询是否有任何方法可以避免使用本机SQL查询?

    Nested classes are not allowed in HQL currently .

    编辑:外部类具有嵌套类实例的IList。

    2 回复  |  直到 14 年前
        1
  •  1
  •   Community Mohan Dere    9 年前

    NHibernate nested class mapping issue

    然后,使用HQL或Linq来NHibernate,您可以简单地说 string hql=“来自s商店,其中s.Employee.Id=3”;

        2
  •  0
  •   Remi Despres-Smyth    15 年前