I have following query:
Code:
select infobit.name from infobit in class com.infodesire.infobit.dao.InfobitImpl where infobit.actualVersion.content.attributes['language']='DE'
Where InfobitImpl has many-to-one to actual version:
Code:
<many-to-one
name="actualVersion"
class="com.infodesire.infobit.dao.VersionImpl"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="actualversionid"
not-null="false"
/>
VersionImpl is one-to-one to content, which got map of attributes
( primitive, string )
Resulting Query ( SQL, mysql) is:
Code:
select infobit.name as x0_0_ from infobit infobit, content_attributes attribut2_ where (attribut2_.value='DE' and infobit.actualversionid=versioni0_.id and versioni0_.id=contenti1_.id and contenti1_.id=attribut2_.contentid and attribut2_.name = 'language')
It looks to me, that hibernate correctly travesed relation to content,
but somehow forgot to join in version...
Or do I misss something important?
tia