About TableGenerator


Auto Generated Values

Explains the different strategies for generating auto values (mainly for primary key fields) in JPA.... generator to use as specified in the SequenceGenerator or TableGenerator annotation. See JavaDoc Reference Page... = "seq" ... is an entity. See JavaDoc Reference Page... @ TableGenerator javax.persistence.TableGenerator JPA annotation ...


JPA Annotations for Value Generation

Reference (JavaDoc) of JPA 2 value generation annotations, including @GeneratedValue, @SequenceGenerator and @TableGenerator.... javax.persistence.TableGenerator More details about automatic value generation are ...



Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation.(Annotation of JPA)


Failing to read entities under load in multithreaded tests

Hi, We are experiencing an issue in our application that only occurs under load - we sometimes fail to read entities from the database. ... InheritanceType . TABLE_PER_CLASS ) @ TableGenerator ( name = "TestIdTableGen" , initialValue = ...


Possible issue with timestamps

Hi, If I query doing something like: select c from CDI c where c.creationDate > {ts '2012-03-29 11:00:00} and c.creationDate < {ts '2012-03-29 12:00:00'} the test fails. Its ONLY for 12:00:00. When I started digging I found that if I queried 00:00:00 to 00:25:00 and then did 12:00:00 to 12:25:00 I got IDENTICAL results. For some reason 12:00:00 is being treated the same as 00:00:00. All other hours seem to be fine. ... }   @ Entity @ TableGenerator ( name = "IdTableGen" , initialValue = 1 ...



Provides for the specification of generation strategies for the values of primary keys.(Annotation of JPA)



(Optional) The name of the primary key generator to use as specified in the SequenceGenerator or TableGenerator annotation.(Annotation Element of javax.persistence.GeneratedValue)


Possible cause for "Enhancement of type ... is old and cannot be used"

We get the following log: ... BUG: objectdb-2.6.6_07: FAILS on @OneToMany with @TableGenerator/strategy = GenerationType.TABLE You had attempted to ... to modify a primary key of a managed object" when using a TableGenerator. That problem was demonstrated by the provided test ...



... in large transactions. Fixed a bug in using @TableGenerator / GenerationType.TABLE. Fixed handling classes ...


@SequenceGenerator and single id in whole database

Hi, I have a question about @SequenceGenerator. I have separate @SequenceGenerator in each of my model enitities, but it looks like id's are generated using only one, shared generator. Is there any other way to use separate generators for each entity, so that each entity uses its own sequence just like in RDBM?... By using multiple @SequenceGenerator and/or @TableGenerator definitions (with different name values), and attaching ...