• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate exception on selecting record based on multiple tables..?

 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am new to hibernate i have to select data based on given condition so i have written a query like this


but it is throwing the fallowing exception

illegal syntax near collection

please help me..
 
Sunil Sunny
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

String query1="from CompanyInfo comp where comp.companyId=:loginid1 and comp.compContactInfos.compPhoneNumber=:phone1 ";

what does this statement means "comp.compContactInfos.compPhoneNumber". You are getting error here . Try to look at this statement .


Use "comp.compPhoneNumber=:phone1;"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic