I have the following Activity model with the Title language property. Language dependency is defined by two additional Translation objects (the name has this type, many-to-one) and TranslationValue (one-to-many).
If I write the following hql:
from Activity act join fetch act.Title join fetch act.Title.TranslationValuesSet
So far this is wonderful. But as soon as I add an action to the select-statement, I have a problem with the TranslationValuesSet connection:
select act from Activity act join fetch act.Title join fetch act.Title.TranslationValuesSet
NHibernate.QueryException: Query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=,role=Translation.TranslationValuesSet,tableName=TranslationValue,tableAlias=translatio3_,origin=Translation translatio2_,colums={translatio2_.TranslationId ,className=TranslationValue}}] [select act from Activity act join fetch act.Title join fetch act.Title.TranslationValuesSet
I canβt understand why Hibernate doesn't like this !?
thanks for any tips!
nhibernate hql
sl3dg3
source share