Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HQL I want to get all events in which user participate.

 
Dejan Tadic
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get all events in which user participate.
My HQL for it is: from Event e join e.participantsList userdata where userdata.userid=:fuserid
but it does not work...help please,pretty please with sugar on top



Tables in db:
event(eventid)
userdata(userid,nickname)
event_userdata(eventid,userid)

[Added code tags - see UseCodeTags for details]


 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Java Ranch!

Please read ItDoesntWorkIsUseless.

What were you expecting? What happened? Was there an exception with a stack trace? If so post it.
 
Dejan Tadic
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry i am new to this form...thanks for let me know

by the way i find the solution on my own.

HQL : select event from Event as event,UserData as user where user.userID=:fuserid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic