-->
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.  [ 6 posts ] 
Author Message
 Post subject: database schema in CaveatEmptor
PostPosted: Thu Jul 22, 2004 12:28 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
I can't find database schema in CaveatEmptor

Is there this script ?

regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2004 12:33 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The schema is automatically generated by the unit tests.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2004 12:49 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
How I can see schema ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2004 1:32 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
By running the unit tests. You probably also like to disable the automatic dropping of the schema at the end, see TestCase.java and remove the "drop" in tearDown(). You could also simply write an Ant target and call SchemaExport yourself with the hibernate.cfg.xml.

I'll include a SQL DDL file in the next release...

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 3:00 pm 
Newbie

Joined: Thu Aug 05, 2004 2:53 pm
Posts: 1
open TestCase.java....


protected void setUp() throws Exception {
super.setUp();
SchemaExport ddlExport = new SchemaExport(HibernateUtil.getConfiguration());
ddlExport.setOutputFile("createAll.sql");// <--- add this line
ddlExport.create(false, true);
}



protected void tearDown() throws Exception {

super.tearDown();
SchemaExport ddlExport = new SchemaExport(HibernateUtil.getConfiguration());
ddlExport.setOutputFile("dropAll.sql"); // <--- add this line
ddlExport.drop(false, true);
}


If you really want the sql script :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 3:01 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The 0.9.2 version released yesterday has an Ant task.

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


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