File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes selecting nexval from a db sequence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "selecting nexval from a db sequence" Watch "selecting nexval from a db sequence" New topic

selecting nexval from a db sequence

Yellapa Adepu
Ranch Hand

Joined: Jan 17, 2006
Posts: 34
when I try to select the NEXTVAL from a DB Sequence entity. Hibernate is appending the logged in user id as a schema rather the schema defined in

Any ideas on why it is doing so. Please suggest.


Yellapa Adepu<br />SCEA
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Can you show the query?

How are you selecting the nextval?

Personally, I would use an SQLQuery object for it and just use the

"select mySeq.nextval from dual" query for it. Just straight SQL.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: selecting nexval from a db sequence
It's not a secret anymore!