GeneratedValue « Column « JPA Q&A





1. GeneratedValue for non ID/PK columns    forum.hibernate.org

Hello, I am wondering if it is possible to use the @GeneratedValue and @GenericGenerator annotations also on non id columns (columns not annotated with @Id)? I tested it with some classes and it seems, that the generator is only used, when the @Id annotation is set. Because we don't want to use fields, which are used outside the system as identifiers ...