About sequence


Auto Generated Values

Explains the different strategies for generating auto values (mainly for primary key fields) in JPA.... The Identity Strategy The Sequence Strategy The Table Strategy The ... values are unique only per type hierarchy. The Sequence Strategy The sequence strategy consists of two parts - ...


JDO PersistenceManager.getSequence() returns null sometimes

When using JDO without annotations, database sequences are normally defined in the ORM file. Following discussion on the forum I was told that ObjectDB supports sequences if specified in the JDO file. Unfortunately, it doesn't seem to be supported consistently. It appears to work only in the situation that a new odb file has just been created AND something has been persisted to it. If nothing has yet been persisted, or if the odb file is not newly created, getSequence() returns null. Code to reproduce: ... ; import javax. jdo . datastore . Sequence ; import testcase. Thing ;   public class ... ( ) ;   Sequence seq1 = pm. getSequence ( "seq" ) ; // ...



Implementations of this interface can be used to obtain sequences.(Interface of JDO)


Is there a function of "drop table" or "delete from table"?

Besides the em.remove() one by one, is there a function of "drop table" or "delete from table"? TIA ... following non portable code, however, resets the global sequence IDs: javax. jdo . datastore . Sequence sequence = em. unwrap ( javax. jdo . ...


JDO sequences from ORM file

I want to use sequences in JDO without using annotations. Normally this is done with a package-X.orm file, where X is a value passed to the PersistenceManagerFactory as the value of property "mapping". I'm encouraged to see that the JDO zip that comes with ObjectDB includes the DTD/XSD for this type of file, though I can't see a mention of it in the manual. ... name = "com.spiffymap.model" > <sequence name = "UserSequence" strategy = "TABLE" /> ... I didn't think sequence was valid in a package.jdo file. I tried adding the following to ...


Use of sequences to generate field values in JDO

I'm trying to use sequences to set field values in JDO.  I want to do this in XML metadata to avoid use of annotations. This is an example of what I'm trying:   <package name="com.spiffymap.sealog.model">         <sequence name="audit_seq" factory-class="java.lang.Long" strategy="contiguous"/>         <class name="Audit" identity-type="application"> ... name = "com.spiffymap.sealog.model" > <sequence name = "audit_seq" factory - class = "java.lang.Long" ... - key = "true" value - strategy = "sequence" sequence = "audit_seq" / > When the code is ...



Indicates that the persistence provider must assign primary keys for the entity using a database sequence.(Enum Constant of javax.persistence.GenerationType)


Time Sequence Object Command DB

We (www.s2ssystems.com) have a time-sequential object command database.  I would like to see if it can be built and run efficiently on ObjectDB.   The requirements that drive the design of this database are: ... solution is to write the transactions to the database in sequence.  This is very efficient in that database writes are always ... must, however, be executed in their time-ordered sequence.  Object schemas are stored in the database and updated schemas ...



Annotation for a datastore sequence.(Annotation of JDO)



Name of sequence to use when the strategy involves sequences(Annotation Element of javax.jdo.annotations.DatastoreIdentity)