Joined: Mon Aug 28, 2006 6:13 am Posts: 1
|
Hello All
I have a scenario where I have to use JOIN FETCH WITH option. I have my screen actions in one table and action translations in second table and i have one-to-many releationship between these two mappings. I have writen following query in HQL to fetch screen actions in a specified language( Actions for which no translation is there need to return NULL records with them for translation)
from CpcsScreenUserActionMaster as actionmaster
left outer join fetch actionmaster.cpcsScreenUserActionTransls as translation
with translation.langId = :langid
When i execeute this , i get the following error
[color=red]unexpected token: with [from CpcsScreenUserActionMaster as actionmaster join fetch actionmaster.cpcsScreenUserActionTransls as translation with translation.langId = :langid ]; nested exception is org.hibernate.QueryException: unexpected token: with [from CpcsScreenUserActionMaster as actionmaster join fetch actionmaster.cpcsScreenUserActionTransls as translation with translation.langId = :langid ]
org.hibernate.QueryException: unexpected token: with [from CpcsScreenUserActionMaster as actionmaster join fetch actionmaster.cpcsScreenUserActionTransls as translation with translation.langId = :langid ]
at org.hibernate.hql.classic.FromParser.token(FromParser.java:105)
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:86)[/color]
I am using hibernate version 3.1.3.
What might be the problem in this case ? Am i using wrong version of Hibernate or something else ? Please help as we are stuck in to this .
|
|