This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes getting results from uniqueResult() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

getting results from uniqueResult()

Aaron Parker

Joined: Jan 31, 2004
Posts: 27
How do I get results out of the uniqueResult() method of the Query class. I can get a result into it, but I can't find anything that explain how to get stuff out!

Object results;
results = query.uniqueResult();
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32815

Is the Query class from a library? What is the package name?

There is a, but I don't think that's the one you are referring to.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Apparently it's a Hibernate thing, but in any case this is a duplicate so this copy will be closed.

Please don't post the same question in multiple forums, it creates duplicate conversations and wastes the time of the people trying to help you.

I agree. Here's the link:
subject: getting results from uniqueResult()
It's not a secret anymore!