Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPA, Toplink, Query with getSingleResult returns Vector, should it?

419516Jun 5 2007 — edited Jun 5 2007
I don't understand why when I do a simple query "Select count(*) From ...." and get use the EntityManager my code is something like this:
getEntityManager().createNativeQuery(sql).getSingleResult()

and what I get is a Vector object that has inside a BigDecimal object. I wonder how portable this is if I use hibernate. I bought a book that was written by a couple of guys from Oracle and their example returns a Object array instead of a Vector even when getResultList() function is called.

I can't find any documentation where it indicates what is returned from getSingleResult() and getResultList().

Any help from any gurus are most welcomed....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2007
Added on Jun 5 2007
4 comments
1,362 views