Hello,

I have following mapping:

[code]

<class xmlns="urn:nhibernate-mapping-2.2" name="Category"
table="`Categories`">
  <id name="Id" type="System.Int32">
    <column name="Id" />
    <generator class="identity" />
  </id>
  <map cascade="all"
       name="Translations"
       table="CategoriesTranslations">
    <key column="CategoryId" />
    <index column="Language" type="System.String"/>
    <composite-element class="Translation">
      <property name="Name"/>
      <property name="Tooltip"/>
    </composite-element>
  </map>
</class>

[/code]

and following HQL query:

[code]
var categories = _session.CreateQuery("from Category category " +
                                                  "left join fetch
category.Translations translations " +
                                                  "where
index(translations)=:language")
                                .SetString("language", "en")
                                .List<Category>();
[/code]

I would like to use ICriteria query instead od HQL but I have no idea
what to use for "where index(translations)=:language" as restriction
using CreateCriteria query.

Thank you in advance.
Marek

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to