Hi,
I have the following mapping of my "Industry" object:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Domain.Industry, Core" table="industry">
<id name="ID" unsaved-value="0">
<generator class="identity" />
</id>
<map name="AllNames"
access="nosetter.camelcase-underscore"
table="_dict_industry_name"
cascade="all-delete-orphan">
<key column="record_id"></key>
<index column="culture_id" type="Int32"></index>
<element column="translation" type="String"></element>
</map>
</class>
</hibernate-mapping>
Now I would like to query all Industries ordered by the element of a
given culture_id.
I am stuck here ... I think i am close with this, but it does not
work:
string query = "from Industry industry order by industry.AllNames
[:lcid]";
IQuery q = NHibernateSession.CreateQuery(query);
q.SetParameter("lcid", DomainCulture.Current);
Thanks guys!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---