Hi,
I have object called Article which holds java.util.map property.
Map property is mapped like this:
Code:
<map name="translations" table="i18n_content" lazy="true">
<key column="articleID" />
<index column="language_code" type="string"/>
<composite-element class="ArticleTranslation">
<property name="title">
<column name="k_title" length="255" not-null="true"/>
</property>
Now, I want to query only those Article objects which have certain key in map.
I thought to solve this with join fetching using query like:
Code:
from Article as article
left join article.translations as translation
where .....
thats where I realized that I don't know how to reference to map key in HQL.
Can somebody help me about this problem? Is this even possible?