About SequenceGenerator

manual

Auto Generated Values

Explains the different strategies for generating auto values (mainly for primary key fields) in JPA.... in one or more fields in one or more classes. The @SequenceGenerator javax.persistence.SequenceGenerator JPA annotation Defines a primary key generator ...

 
api-jpa

JPA Annotations for Value Generation

Reference (JavaDoc) of JPA 2 value generation annotations, including @GeneratedValue, @SequenceGenerator and @TableGenerator.... the following annotations: javax.persistence.SequenceGenerator javax.persistence.TableGenerator More ...

 
forum_thread

@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?... Hi, I have a question about @SequenceGenerator . I have separate @SequenceGenerator in each of my model enitities, but it looks like id's are ...

 
forum_thread

Primary key generation problem after changing entity package

Hi, I changed package name for some of my entities in database. I added info in <schema><package... /></schema> of my configuration file - and the changes have been succesfully made in database. Unfortunately, sequences have been probably lost for changed entity classes. After schema change I keep getting errors : Attempt to reuse an existing primary key value... My primary keys are annotated as shown below : ... annotated as shown below : @ Id @ SequenceGenerator ( name = "SEQ_BOARD" , allocationSize ... Also, when I modify initialValue parameter of existing SequenceGenerator - no changes are made. Changing sequenceName don't help. ...

 
forum_thread

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @OneToMany(fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: ... Entities: @ Entity @ SequenceGenerator ( name = "b" , allocationSize = 1 ... } }   @ Entity @ SequenceGenerator ( name = "b" , allocationSize = 1 ...

 
api-jpa

javax.persistence.SequenceGenerator

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

 
forum_thread

openejb jpa jaas module

    hello , i've finished jpa jaas module. Here it is :   package com.bayner.auth; import com.bayner.jpa.Principals; import com.bayner.jpa.UserInfo; import com.bayner.jpa.UserPrincipal; ... @ Cacheable @ Entity @ SequenceGenerator ( name = "gen" , ... @ Cacheable @ Entity @ SequenceGenerator ( name = "seq" , initialValue = 10000 ...

 
forum_thread

com.objectdb.o.NLV cannot be cast to com.objectdb.o.CMV

We are using ObjectDB 2.5.1_04. The following JPQL query causes an internal exception: SELECT COUNT(r) FROM RecordingMetaData AS r WHERE ((r.mapFromCli LIKE '192.168.10.13%' ESCAPE '\')) The exception: ... ( name = "RecordingMetaData" ) @ SequenceGenerator ( name = "RecordingMetaData_sequence" , ... ( name = "RecordingMetaData" ) @ SequenceGenerator ( name = "RecordingMetaData_sequence" , ...

 
forum_thread

Join performance in Objectdb

select count(e) from Meta e, ImageNet i, Page p where e.idImage=i.id and e.idPage=p.id; So simple a command cause me half an hour and is running now! Each table has about 160K records. What formula can predict the time for such counting? TIA ... }   @ Entity @ SequenceGenerator ( name = "seqB" , allocationSize = ... }   @ Entity @ SequenceGenerator ( name = "seqC" , allocationSize = ...

 
forum_thread

Wrong data stored in time only fields

This may be related to the fix for the problem described in this thread: Wrong data stored in date only fields. The object and its date and time fields are the same as in the referenced thread. Except we are using ObjectDB 2.6.4_08, the system time zone is set to EST and both the OS and JVM are using the 2015g time zone data. ... . Query ; import javax. persistence . SequenceGenerator ; import javax. persistence . Temporal ; ... ( name = "DateTime" ) @ SequenceGenerator ( name = "DateTime_sequence" , ...