-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 2.1.8 autoddl MySQL 4.1.11 longvarchar
PostPosted: Wed Dec 07, 2005 6:51 am 
Newbie

Joined: Wed Dec 07, 2005 6:41 am
Posts: 2
Hi,
I'm having trouble getting autoddl to generate the below class with Connector/J 3.1.12 (also 3.1.10, 3.1.11):

<class name="uk.ac.cam.caret.sakai.rwiki.component.message.model.impl.TriggerImpl"
table="rwikipagetrigger" >
<id name="id" unsaved-value="null" >
<column name="id" length="36" not-null="true"/>
<generator class="uuid.hex" />
</id>
<property name="user" column="userid" not-null="true" index="true" type="string" length="64" />
<property name="pagespace" column="pagespace" type="string" index="true" length="255"/>
<property name="pagename" column="pagename" type="string" index="true" length="255" />
<property name="lastseen" column="lastseen" type="timestamp" />
<property name="triggerspec" type="text" />
</class>

When hibernate starts up we get the below exception:

WARN: Unsuccessful schema statement: create table rwikipagetrigger (id varchar(36) not null, us
erid varchar(64) not null, pagespace varchar(255), pagename varchar(255), lastseen timestamp, t
riggerspec longvarchar, primary key (id)) (2005-12-07 10:20:03,267 main_org.springframework.orm
.hibernate.LocalSessionFactoryBean)
java.sql.SQLException: 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 'longvarchar, primary key (id))'
at line 1

Anyone got any ideas how to fix this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 8:58 am 
Newbie

Joined: Wed Dec 07, 2005 6:41 am
Posts: 2
It turns out that the dialect wasn't being set correctly, and auto.ddl was being generated for HSQL rather than MySQL.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.