2 Replies Latest reply on Sep 17, 2004 4:37 PM by lafr

    Using Oracle Sequence for CMP Entity Beans

    soheil

      Dear All,

      I have a table in oracle that its primary key is a sequence.
      I want to know how can i use it for my CMP ?
      And would you please write me how to write that fragment of jbosscmp-jdbc.xml ?

      Thanx

        • 1. Re: Using Oracle Sequence for CMP Entity Beans
          atonyd

          I've a similar problem but with SQL Server "auto numbering" identity fields.

          I'll be facing your problem in the next few weeks as we are due to start a port to Oracle.

          If you find an answer can youy post it to the list.

          • 2. Re: Using Oracle Sequence for CMP Entity Beans
            lafr

            In jbosscmp-jdbc.xml you have to put in something like this for every entity which has a field filled by a sequence:

            <entity>
            ....
             <entity-command name="oracle-sequence">
             <attribute name="sequence">afsta_seq</attribute>
             </entity-command>
            </entity>