Posted by mriem in mriem on Aug 22, 2007 12:30:00 AM
Note this blog is obsolete, see https://www.manorrock.com/blog/ for the current blog
OK, native queries in JPA. Not really well documented. Of course I understand that we really should not be doing that, but hey there are times where it is just plain easier.
The following code snippet goes after an Oracle sequence and gets the value.
As you can see by reading the Java code if you do a native query you can map the result to a Vector and then for each row you have a Vector for all the columns. In this particular case only one and the first column is an Integer.