This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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

Win a copy of Head First Android this week in the Android forum!
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: 17271

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
jQuery in Action, 3rd edition
subject: selecting nexval from a db sequence
It's not a secret anymore!