-->
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.  [ 1 post ] 
Author Message
 Post subject: Auxiliary database-object broken in Oracle?
PostPosted: Fri Sep 04, 2009 11:08 am 
Beginner
Beginner

Joined: Fri Oct 28, 2005 10:46 am
Posts: 37
Versions:
Hibernate 3.2.5.ga
Oracle 10g

I'm trying to use the <database-object> element discussed here:
https://www.hibernate.org/hib_docs/nhib ... ase-object

This doesn't work:
Code:
    <database-object>
        <create>
            create table foo ( id number(10) );
        </create>
        <drop />
        <dialect-scope name="org.hibernate.dialect.Oracle10gDialect" />
    </database-object>


It fails with:
Code:
Unsuccessful: create table foo ( id number(10) );                   ERROR SchemaExport(274) 09:30:35,338 main
ORA-00911: invalid character                                        ERROR SchemaExport(275) 09:30:35,339 main


If I remove the semicolon at the end of the statement, it works. This, however, means that I can only put one create statement per database-object, and I have around 50 that need to be executed. I'd much rather not have to have the clutter of all the database-object xml for every single statement.

The same kind of thing works in H2 with the semicolons so that I can include multiple statements like I want to. Does anyone have an idea why it doesn't work for oracle?


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

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.