0 Replies Latest reply on Aug 14, 2008 10:34 AM by oggmeister

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

    oggmeister

      Hi,

      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 ...

      Thanks!