GenerationType « Table « JPA Q&A





1. JPA GeneratedValue with GenerationType.TABLE does a big jump after jvm restart    stackoverflow.com

When I start my server and add an entry, the generated id will start with 1, 2, so on and so forth. After a restart, adding an entry would generate an ...

2. 3.5-final fail on GenerationType.TABLE    forum.hibernate.org

I user GenerationType.TABLE on id @GeneratedValue, @Id @TableGenerator( name = "ID_GENERATOR", table = "ID_GEN", pkColumnName = "GEN_NAME", pkColumnValue = "User", valueColumnName = "GEN_VALUE", initialValue = 1 ) @GeneratedValue(strategy = GenerationType.TABLE, generator = "ID_GENERATOR") private Long id; I work fine with 3.3.2GA, but when I upgrade to 3.5-final. I can get Id correct,but It can't update "ID_GEN" correct .so when I shutdown ...

3. can GenerationType.TABLE coexist with non-jpa applications?    forum.hibernate.org

Is there a way to reserve some identifiers from being generated? This will allow me to reserve some ids for non-jpa applications, like a shell script that adds entries. Anyone with a pointer of the algorithm hibernate uses to select an id with GenerationType.TABLE? Does not look predictable to me. Thanks, John