Skip to Content

Support for JPA generation type SEQUENCE

Does SAP Cloud Platform have any plan to support JPA id generation using a HANA database sequence? At the moment, we're using the default TABLE generation type however that can cause locking issues.

With thanks,

Scott

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 24, 2017 at 09:06 AM

    Hello, Scott. If you can use the database sequence to generate pk of a table. Usually, we generate-id on service layer of application by using UUID or Custom ID generator Class. I suggest that using UUID+tableCode (new column of your table) together. It will bring more benefits when doing data migration. thanks.

    package com.mytest;
    import java.util.UUID;
    public class UTest {    
              public static void main(String[] args) {        
                    UUID uuid = UUID.randomUUID();        
                    System.out.println(uuid);    
              }
    }
    
    Add comment
    10|10000 characters needed characters exceeded