Skip to main content


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 FarrollFriend
Messages: 60
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 BatemanFriend
Messages: 3798
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:Using external jar file from eclipse plugin
Next Topic:Questions ab0ut "myfirsttest"
Goto Forum:
  


Current Time: Thu Apr 18 16:14:48 GMT 2024

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

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

Back to the top