-->
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.  [ 5 posts ] 
Author Message
 Post subject: SchemaExport generating incorrect Postgresql DDL
PostPosted: Wed May 26, 2004 12:31 pm 
Newbie

Joined: Tue May 25, 2004 6:35 pm
Posts: 3
Hello,
I'm running SchemaExport on my hbm file and generating DDL file for a postgresql database. I have a hibernate config file that sets the dialect to postresql.
My issue is that the DDL that gets generated does not have a semi-colon at the end of each DDL command. I went through the hibernate code that generates the DDL and found that the dialect is not consulted for this (ie: a semi-colon will never be produced no matter what dialect you use).

I'm wondering if anyone else has experienced this problem? Is this a bug, or am I setting something up wrong?

I'm using hibernate 2.0.3.

Here is a snip from the DDL that I am generating:
Code:
drop table portfolio
create table portfolio (
    portfolio_id INT8 not null,
    title VARCHAR(255),
    size INT8,
    primary key (portfolio_id)
);


The above gives me errors when I try to execute it. When I add semi-colon's as follows, it runs fine:
Code:
drop table portfolio;
create table portfolio (
    portfolio_id INT8 not null,
    title VARCHAR(255),
    size INT8,
    primary key (portfolio_id)
);


Any ideas?
Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 12:33 pm 
Newbie

Joined: Tue May 25, 2004 6:35 pm
Posts: 3
Sorry, just to be clear, the DDL that gets generated without semi-colon's and does not run looks like this:
Code:
drop table portfolio
create table portfolio (
    portfolio_id INT8 not null,
    title VARCHAR(255),
    size INT8,
    primary key (portfolio_id)
)

Without any semi-colons.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 5:41 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
--delimiter

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 27, 2004 11:54 am 
Newbie

Joined: Tue May 25, 2004 6:35 pm
Posts: 3
Thank you christian.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 02, 2004 10:48 am 
Newbie

Joined: Thu Dec 02, 2004 6:27 am
Posts: 10
If it's not clear from the above (I had to scratch my head, having just run into the same problem) you need to set the "delimiter" property.

If you use maven that is documented here.


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