0 Replies Latest reply on Aug 14, 2008 12:21 PM by Daniel Behrwind

    How to define a sequence for non-primary key fields?

    Daniel Behrwind Newbie


      is it possible (with JPA or Hibernate) to define a sequence for a JPA-entity's attribute that is not the primary key?

      All I found so far was the @GeneratedValue annotation. But the JPA Api-Doc says that it may only be used in conjunction with @Id ...