Hi All

I have a n issue with using Query getResultList(), I am executing a nativeQuery("SELECT * FROM ENTRY", Entry.class). And performing the query like so List<Entry> results = (List<Entry>)query.getResultList(); and in return I am seeing a list containing a delegate and a persistence object.

My main problem is that I am trying to display the resulting data that comes back in a JList, in order to set the list data on a JList you have to have the data in a Vector. So when I tried to cast the List to a Vector I got an exception.

When I perform the same query using TopLink I get back a list of Objects of the type and no extra information. At the moment I am going through the results and getting each Object element and adding to Vector to display. This is fine with a small amount of records but what about a large amount of records.

What is the best way of getting back just a list of Objects no additional data?

Thanks

David

Reply via email to