-->
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.  [ 3 posts ] 
Author Message
 Post subject: Schema export truncates table
PostPosted: Mon Jun 19, 2006 9:00 am 
Regular
Regular

Joined: Mon May 22, 2006 8:32 am
Posts: 67
Hi there,

i am still working on a strage problem which i don't understand:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
        <property name="hibernate.connection.password">password</property>
        <property name="hibernate.connection.url">jdbc:microsoft:sqlserver://10.148.7.203;DatabaseName=Reporting;SelectMethod=cursor</property>
        <property name="hibernate.connection.username">user</property>
        <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
    </session-factory>
</hibernate-configuration>



When i run schema export on my hibernate configuration all data from the used tabes is gone...! Is this a feature? How to avoid this? I thought i have to use the property
Code:
  <property name="hbm2ddl.auto">delete</property>
to achieve this?!

What happened? Can i turn this deletion off?

Thanks for advice,

regards,

a.k.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 9:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
eh ? schemaexport means *export* the schema to the db ...and that means "put this schema in effect on the db" and no, it does not maintain existing data/tables.

Take a look at schemaupdate for this (but note these two tools is not intended for usage against a production db)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Truncating tables
PostPosted: Mon Jun 19, 2006 10:20 am 
Regular
Regular

Joined: Mon May 22, 2006 8:32 am
Posts: 67
Hi Max,
max wrote:
eh ? schemaexport means *export* the schema to the db ...and that means "put this schema in effect on the db" and no, it does not maintain existing data/tables.

Take a look at schemaupdate for this (but note these two tools is not intended for usage against a production db)

Sorry for this misunderstanding.
Ok, so the export did the truncation on my tables not the reverse engeneering process. That is what i wanted to know.

Thank a lot, regards,

a.k.


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