2 Replies Latest reply on Jan 22, 2009 3:59 AM by SreeharshaReddy N

    sequence generator and bigDecimal

    John McClain Newbie

      Not sure about this one...
      I have a bunch of legacy tables where the PK is number(22) (in Oracle). I have created a sequenceGenerator to be used for isnerts with an entityManager. My annotations are as follows :

       @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FRAUD_CASENUMBER_SEQ")
       public BigDecimal casenumber;

      With BigDecimal getters/setters

      But when I do an insert (em.persists(newCase)) I get:
      Caused by: org.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short or string

      Given that my table pk is number(22), how do I get the sequencegenerator to work with it?