aspose file tools*
The moose likes Object Relational Mapping and the fly likes Problem whne used custom squence name in JPA (hibernate) annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem whne used custom squence name in JPA (hibernate) annotations " Watch "Problem whne used custom squence name in JPA (hibernate) annotations " New topic
Author

Problem whne used custom squence name in JPA (hibernate) annotations

prash patil
Ranch Hand

Joined: May 26, 2008
Posts: 40
Hi Ranchers,

I am facing one problem while using my predefined squence in the generator.

Below are the details.

I have created a table student with column id, `sname` 'sroll`,`scourse` and PRIMARY KEY (`id`)
The persistence xml have below data


and Student class is


And the sequence student_id_seq exist in the oracle.

But when used it

Got exception


Please suggest if I am missing anything.

Thanks in Advance

PP.
Christian Dillinger
Ranch Hand

Joined: Jul 20, 2009
Posts: 189
Does your user bgadmin "see" the sequence?
prash patil
Ranch Hand

Joined: May 26, 2008
Posts: 40
yes it does!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem whne used custom squence name in JPA (hibernate) annotations