0 Replies Latest reply on Feb 27, 2007 9:47 PM by hanasaki jiji

    msyql and postgresql - identity columns

    hanasaki jiji Newbie

      how can the same ejb3 entity code be used with both MySQL and PostgreSQL on the primary keys (integers).

      The databases already exist - and cannot be modified
      mysql is AUTO_INCREMENT
      postgresql is SERIAL

      It looks like Identity can be used with mysql but not postgresql? Is the only way to fall back to table based sequences?

      The below link was not much help...
      http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#entity-mapping-identifier