0 Replies Latest reply on Apr 7, 2007 11:34 AM by teo doro

    JBOSS Oracle sequence

    teo doro Newbie

      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.