IntelliJ Java IDE
The moose likes Ant, Maven and Other Build Tools and the fly likes problem with schemaexport Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "problem with schemaexport" Watch "problem with schemaexport" New topic
Author

problem with schemaexport

Amit KumarS
Ranch Hand

Joined: Oct 10, 2003
Posts: 100
hi all,

i am new to ant. plz help.. i am pasting a piece of ant script



the values set are like followig

<property name="hibernate.properties.path" value="/hibernate.properties"/>
<property name="subproject.schema-export.path" value="schema-export.sql"/>


the hibernate.properties file contains

#Fri May 14 12:46:15 GMT+05:30 2004
hibernate.connection.username=amitcore
hibernate.connection.password=amitcore
hibernate.dialect=net.sf.hibernate.dialect.OracleDialect
hibernate.connection.url=jdbc\ racle\:thin\:@(description\=(address\=(host\=192.168.4.173)(protocol\=tcp)(port\=1521))(connect_data\=(sid\=oradb)))
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver




now the scenerio...

i figured out the schemaexport tag generates "schema-export.sql" file and then executes this on to databse...

but the prob is that it first deletes the tables created on the database and then creates fresh tables which results in loss of test data..

note: - this schema-export.sql file is autogenerated somehow and it has "drop table" at the begining..

now the question is how can i stop the previous tables from getting deleted if previous tables already exist...


plz help..

Amit


****************************<br />In 24 hrs Earth rotates once on its Axis.
 
 
subject: problem with schemaexport
 
Threads others viewed
Solution to "log4j:WARN No appenders could be found for logger"
SchemaExportTask Works, but not really
Ant-SchemaExportTask
Mapping entities
creating .hbm.xml file
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture