2 Replies Latest reply on Apr 14, 2011 9:31 AM by Tristan Tarrant

    Sybase autoincrement columns and Hibernate

    Tristan Tarrant Master

      Dear all,

       

      I am accessing several Sybase databases through Teiid and in my app via Hibernate. These dbs have primary key columns declared as autoincrement.

       

      How should I configure Teiid and the Hibernate annotations of my entities to handle these correctly ?

       

      I guess I can use

       

      @Id

      @GeneratedValue(strategy=GenerationType.IDENTITY)

      Long id;

       

      What should I configure on the VDB to tell it to get the pk generated by the database ?

       

      Thanks in advance.

       

      Tristan