[jboss-user] [Beginners Corner] - JBOSS Oracle sequence

teodoro21 do-not-reply at jboss.com
Sat Apr 7 11:34:30 EDT 2007


I'm developing and learning with EJB 2.1 CMP entity bean.
I'm using jboss 4.0.5 and Oracle 10 xe.

My problem is the following:

I have created a simple  CMP entity bean with only two fields:

- id (pk)
- name (String)

Now I want to use Oracle sequence as my pk id.
I don't know the best way to do do it.

Where I define that id value must be sequence.nextval?

With other db such as Mysql there is auto-generated primary
key, but with Oracle I'd prefer to use a sequence and for example a different sequence for every EJB CMP Entity bean.

Please help me.
teo

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035531#4035531

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035531



More information about the jboss-user mailing list