Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Jpa-Mysql

814889Nov 16 2010 — edited Nov 17 2010
Hi

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2010
Added on Nov 16 2010
3 comments
880 views