Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Hibernate mapping(Mapping Hibernate to ArrayList)
Hibernate mapping [message #1003524] Mon, 21 January 2013 12:43 Go to next message
Alan Farroll is currently offline Alan Farroll
Messages: 56
Registered: June 2012
Member
Hi all,

I am slowly leaning Java and never used Hibernate and have a Java project created by a former colleague with problems I need assistance please.

The project currently has Hibernate set up with criteria to search a database of document meta-data and currently assumes a "Unique Result", with this line of code;

doc = (DocumentDetails) criteria.uniqueResult();

Meaning, I think, it expects only one document's details as a result. But we now can have multiple possible documents' details returned and I need to place them into an ArrayList to determine which one is the latest document.

Any assistance would be appreciated on how to do this. I apologise for me being forward but I need to solve this one quick.

Thanks in advance

A Farroll
Re: Hibernate mapping [message #1003625 is a reply to message #1003524] Mon, 21 January 2013 16:31 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3231
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 01/21/2013 05:43 AM, Alan Farroll wrote:
> Hi all,
>
> I am slowly leaning Java and never used Hibernate and have a Java
> project created by a former colleague with problems I need assistance
> please.
>
> The project currently has Hibernate set up with criteria to search a
> database of document meta-data and currently assumes a "Unique Result",
> with this line of code;
>
> doc = (DocumentDetails) criteria.uniqueResult();
>
> Meaning, I think, it expects only one document's details as a result.
> But we now can have multiple possible documents' details returned and I
> need to place them into an ArrayList to determine which one is the
> latest document.
>
> Any assistance would be appreciated on how to do this. I apologise for
> me being forward but I need to solve this one quick.
>
> Thanks in advance
>
> A Farroll

There is a separate Eclipse forum called data tools platform for issues
like this, though I don't haunt it myself and don't know how active it
is. This said, I think you're asking more of a Hibernate question and,
as such, it would be more properly asked in a Hibernate forum so be
ready not to get this answered in Eclipse DTP until someone who actually
knows comes along.
Previous Topic:Else Error (Total newcomer)
Next Topic:Questions ab0ut "myfirsttest"
Goto Forum:
  


Current Time: Thu Oct 30 16:15:15 GMT 2014

Powered by FUDForum. Page generated in 0.07766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software