-->
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: Dropping tables does not work any more
PostPosted: Mon Oct 22, 2012 9:16 am 
Beginner
Beginner

Joined: Sat Feb 16, 2008 3:09 pm
Posts: 24
Hallo,

we have a JBoss 4.2.3 project. Our build-master has recently modified the build so that
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
is no longer part of the persistence.xml
Before that, all tables of the application have been dropped during the shutdown of the server.
Now I want to have this behavior back and deploy an exploded ear with an expoloded jar. I modify the META-INF/persistence.xml to get
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

     <persistence-unit name="BLA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/BLA</jta-data-source>
      <properties>
        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
         <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
         <property name="jboss.entity.manager.jndi.name" value="java:/bafoeg21EntityManager" />
         
      </properties>
   </persistence-unit>
</persistence>

When I shutdown the server the tables are not dropped, but some (and only some !) of the data is deleted.
I suspect that somehow the old behavior of dropping the tables is overridden in the application, but I have no idea where to look.

Any ideas?


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.