aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "selecting nexval from a db sequence" Watch "selecting nexval from a db sequence" New topic
Author

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 hibernate.properties.

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

Thanks,


Yellapa Adepu<br />SCEA
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: selecting nexval from a db sequence
 
Similar Threads
URLyBird: Database schema
Testing of data class instance(s)
What should be the connection URL
using java.util.UUID
Import data from database with sequence as primary key