[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - How to define a sequence for non-primary key fields?

d.behrwind do-not-reply at jboss.com
Thu Aug 14 10:34:37 EDT 2008


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!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170579#4170579

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170579



More information about the jboss-user mailing list