ObjectDB ObjectDB

Internal Website Search

1-10 of 26 resultsRefresh
156

@SequenceGenerator and single id in whole database

Hi, I have a question about @SequenceGenerator. I have separate @SequenceGenerator in each ... classes: By using multiple @SequenceGenerator and/or @TableGenerator definitions (with different name ... the part about strategy type. Each of my model class got following annotations: @SequenceGenerator
89

javax.persistence.SequenceGenerator

javax.persistence Annotation SequenceGenerator Target: Classes and fields (including property get methods) Defines a primary key generator that may be referenced by name when a generator element ... to the persistence unit (across all generator types). Example: @SequenceGenerator(name="EMP_SEQ
86

SequenceGenerator.allocationSize

Annotation Element javax.persistence.SequenceGenerator int allocationSize (Optional) The amount to increment by when allocating sequence numbers from the sequence. Default value: 50 Since: JPA 1.0
86

SequenceGenerator.sequenceName

Annotation Element javax.persistence.SequenceGenerator String sequenceName (Optional) The name of the database sequence object from which to obtain primary key values. Defaults to a provider-chosen value. Default value: "" Since: JPA 1.0
86

SequenceGenerator.initialValue

Annotation Element javax.persistence.SequenceGenerator int initialValue (Optional) The value from which the sequence object is to start generating. Default value: 1 Since: JPA 1.0
86

SequenceGenerator.catalog

Annotation Element javax.persistence.SequenceGenerator String catalog (Optional) The catalog of the sequence generator. Default value: "" Since: JPA 2.0
86

SequenceGenerator.schema

Annotation Element javax.persistence.SequenceGenerator String schema (Optional) The schema of the sequence generator. Default value: "" Since: JPA 2.0
86

SequenceGenerator.name

Annotation Element javax.persistence.SequenceGenerator String name (Required) A unique generator name that can be referenced by one or more classes to be the generator for primary key values. Since: JPA 1.0
41

Auto Generated Values

and using the named sequence in one or more fields in one or more classes. The @SequenceGenerator ... a sequence - might also be in another class: @SequenceGenerator(name="seq", initialValue=1, allocationSize ... sequence numbers to start with 1 in the TABLE strategy initialValue=0 has to be specified in the @SequenceGenerator annotation.
12

javax.persistence.GeneratedValue

; Since: JPA 1.0 See Also: Id TableGenerator SequenceGenerator Learn how to define and use automatic ... of the primary key generator to use as specified in the SequenceGenerator or TableGenerator annotation. (Optional) The name of the primary key generator to use as specified in the SequenceGenerator or

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support