3 Replies Latest reply on Dec 30, 2005 9:12 PM by epbernard

    Persisting enums...

    inkypinky

      I have an entity bean which has an enum member variable. Previously we were using hibernate without ejb 3 and I persisted it as an int. Is there any annotation I can use to do the same thing. e.g. would it work to do

      @Column(name="intcol")
      public Format getFormat() { return format; }
      public void setFormat(Format format) { this.format = format; }

      Where Format is an enum and intcol is an integer column in a db table?

      Thanks,

      Neil
      Head Skateboarding Officer
      Stuff Limited