Skip Headers

# Configuring the Platform Default Sequence

Previous

Next

In Example: Configuring a Default Sequence, you associate a nonexistent sequence (`NEW_SEQ`) with a descriptor. Because you did not add a sequence named `NEW_SEQ` to the login for this project in Example: Example Sequences, the TopLink runtime will create a `DefaultSequence` named `NEW_SEQ` for this descriptor. For more information about `DefaultSequence`, see "Default Sequencing".

Configuring a Default Sequence

    descriptor.setSequenceNumberFieldName("EMP_ID"); // primary key field
    descriptor.setSequenceNumberName("NEW_SEQ");