-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: problem when using MySql Dialect
PostPosted: Thu Nov 06, 2008 3:22 am 
Beginner
Beginner

Joined: Thu Sep 11, 2008 5:33 am
Posts: 28
Hi All,

when i use my application for hsqldb it workes fine using Hibernate.

but when i change the dialect to mysql one of its table creating problem others are working fine with it.

it throws the following error while creating that table
Code:
create table USER_VOICEMESSAGE (VOICEMESSAGEID bigint not null auto_increment, PHONEADDRESS varchar(50) not null, FILENAME varchar(50) not null unique, READ bit, ADDED_ON datetime not null, USERID bigint, primary key (VOICEMESSAGEID))
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'READ bit, ADDED_ON datetime not null, USERID bigint, primary key (VOICEMESSAGEID' at line 1




i am using mysql-server-5.0.51a, and it is throwing this error on BOOLEAN value

let me know if you need more details.

Regards,
Sachin Parnami


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2008 4:09 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
READ is a reserved word in MySQL. If you want to use it as a column name you need to quote it. Eg. `READ`.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 06, 2008 7:37 am 
Beginner
Beginner

Joined: Thu Sep 11, 2008 5:33 am
Posts: 28
Hi Thanks for your Prompt reply it really helped :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.