Hi All,

More on the global sequence subject - you can define such a sequence in 
persistence.xml like this:

<property name="openjpa.Sequence" 
value="com.datastax.hectorjpa.sequence.TimeUuid()"/>

Having this, you can annotate your entities with plain @GeneratedValue and your 
custom sequence will be used.

As Kevin mentioned, OpenJPA does not call allocate(), however you can call it 
from the application:

        OpenJPAEntityManager kem = OpenJPAPersistence.cast(em);
        kem.getIdGenerator(TimeUuidEntity.class).allocate(100);

Cheers,
Milosz

Reply via email to