aspose file tools*
The moose likes Object Relational Mapping and the fly likes HQL I want to get all events in which user participate. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HQL I want to get all events in which user participate." Watch "HQL I want to get all events in which user participate." New topic
Author

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

Dejan Tadic
Greenhorn

Joined: Aug 20, 2012
Posts: 2
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

Joined: Mar 07, 2010
Posts: 1649
    
    7

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.


[How To Ask Questions][Read before you PM me]
Dejan Tadic
Greenhorn

Joined: Aug 20, 2012
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HQL I want to get all events in which user participate.