Jpa-Mysql
814889Nov 16 2010 — edited Nov 17 2010Hi
i am trying to run an application which was running on oracle,since i dint have oracle i am migrating the code to mysql, the entity class has
@SequenceGenerator(name = "BID_SEQUENCE_GENERATOR", sequenceName = "BID_SEQUENCE", initial Value = 1, allocation Size = 1)
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BID_SEQUENCE_GENERATOR")
annotations ........... in my persistance.xml am using org.hibernate.dialect.MySQLDialect when i deplaoy the application i get error saying that dialect does not support
sequence .After goggling i found that mysql does not support sequence i generated table in mysql by modifying the defination
CREATE TABLE SEQUENCE (
SEQ_NAME VARCHAR(50) NOT NULL,
SEQ_COUNT int(38) AUTO_INCREMENT ,
PRIMARY KEY (SEQ_COUNT));
but i cannot depoly app as mysql dialect does not support sequnce..... is there any alternative.