• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Left join question in hibernate

 
Shak Smith
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I do something like this:


I get the following error
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.manning.hq.ch04.Event
at com.manning.hq.ch04.EventFinder.main(EventFinder.java:43)
It seems that I have two objects (Event and attendees) instead of the Event object that I'm supposed to get.
What can I do to get only the Event object??

Regards
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-select

I kind of thought that's how that was supposed to work; did you try any of the other syntaxes? Are you just trying to get the event plus its attendees?
 
Shak Smith
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just typed Select e and that worked. Thank you!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic