-->
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: table creation
PostPosted: Sun Mar 14, 2004 11:12 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
Hello everyone,
I use hibernate for persistent objects and Hsql as in-memory db.
When I run the hbm2ddl schema update,
It produces the table creation query from the mapping file but in incorrect syntax-)
"
create table TARGET (uid BIGINT not null, type VARCHAR(255),...., [size=12][size=18]primary key(uid))[/size][/size]

the HSQL Database Manager doesnt accept it, it returns "Wrong Data type KEY in statement"

While generating the create table SQL, it must be interpreted as
"create table TARGET(uid BIGINT not null [size=9]PRIMARY KEY[/size], type VARCHAR(255)....)" to be accepted by HSQL DB Manager.

how can I force the tool to generate the SQL like above (defining the primary key role with column definition) ??

Waiting for your suggestments
Thanks...

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 14, 2004 7:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
HSQL is used as the default database for the hibernates test suite and each test uses hbm2ddl to create the datanase tables for the test.

Have you tried the version of HSQL from the hibernate distribution?

It would be helpful as well to state the versions of each item you are using (hibernate, HSQL) and show the mapping document (simple one) that fails so the test can be replicated.


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.