0 Replies Latest reply on Jan 10, 2007 3:52 AM by jimmy mani

    @TableGenerator unexpected behaviour(MYSQL,EJB3,JBOSS)

    jimmy mani Newbie

      i am using Table generator for sequence generation in mysql db.
      i want to start my orderid with 14326 and should increment each time by 3 .
      once i insert a row into order table its showing 42978(14326*3).and gen value of my_sequence_generator table increments by 1 only.
      is it an expected behaviour or some error.

      tell me a solution if i am wrong any where


      @TableGenerator(
      name="orderKeysGen",
      table="my_sequence_generator",
      pkColumnName="GEN_KEY",
      valueColumnName="GEN_VALUE",
      pkColumnValue="orderId",
      initialValue=14326,
      allocationSize=3
      )

      @Id
      @GeneratedValue(strategy=GenerationType.TABLE,
      generator="orderKeysGen")




      jimmy