1 Reply Latest reply on Sep 12, 2007 4:48 PM by lafr

    Sequence generators in Embedded PK

    krudz

      Is it possible to use sequence generetors in embedded primary keys?

      Example
      We want to use:

      @Id
      @GeneratedValue(strategy=GenerationType.AUTO, generator="NotHeadSeq")
      @Column(name = "nhd_id")


      in class with @Embeddable annotation.

      The class with @Embeddable annotation contains few columns which are supposed to be a composite key.

        • 1. Re: Sequence generators in Embedded PK
          lafr

          I don't know what the spec says about this, but I just made the experience that this is not supported at least for the EJB3 implementation for JBoss 4.2.2.

          I'm sure I read about this somewhere in the JBoss' Wiki.