Hi, I wonder if I could preset the id of a record to start with 1000 instead of

Hi, I wonder if I could preset the id of a record to start with 1000 instead of 1 when it stores to the database table? Anything to add into the codes below to make that happen?? Thanks

<xsd:annotation>
<xsd:appinfo source="appian.jpa">
                                                            @Id
                                                            @GeneratedValue
                                                  </xsd:appinfo>
</xsd:annotation>...

OriginalPostID-95347

OriginalPostID-95347

  Discussion posts and replies are publicly visible

Parents
  • Hi Eduardo,

    About your solution, I have some questions:

    What is mysequence? Is it an existing sequence from Oracle? If it is, shouldn’t the initialValue be managed by the database?
    Or is the sequence generated and managed by APPIAN and it has nothing to do with database?
    According to JPA API: sequenceName is The name of the database sequence object from which to obtain primary key values. Because you didn't specify sequenceName, how do they know which sequence object from database to use?

    Thanks.
Reply
  • Hi Eduardo,

    About your solution, I have some questions:

    What is mysequence? Is it an existing sequence from Oracle? If it is, shouldn’t the initialValue be managed by the database?
    Or is the sequence generated and managed by APPIAN and it has nothing to do with database?
    According to JPA API: sequenceName is The name of the database sequence object from which to obtain primary key values. Because you didn't specify sequenceName, how do they know which sequence object from database to use?

    Thanks.
Children
No Data