Questions tagged [hbm2ddl]

hibernate utility to manage the creation and/or deployment of database schemas (data definition language)

198 questions
0
votes
1 answer

Column without member

Using Hibernate we're trying to have it create an additional column to an abstract class - but we can't add a new member to this class (memory consumption in large scale). We need to have Hibernate create the schema (development phase,…
Ten_of_a_Kind
  • 61
  • 1
  • 8
0
votes
1 answer

Using hbm2ddl when model and EM are in different projects

I have a locally-created jar file containing hibernate-annotated entities. I also have a separate project which references this jar. I need to create a db script using hbm2ddl, but am encounting some difficulty. When I try to use the task in the…
Bret
  • 1,455
  • 2
  • 16
  • 27
0
votes
1 answer

Spring Jpa tables in submodule

I'm coding a multi module project with maven and spring boot 1.5. The pom file of my main module referes in test scope to an other module which provides all of our mock classes. The mock module is just for local tests so it will not go productive…
Patrick Lindner
  • 291
  • 3
  • 9
0
votes
1 answer

How to force multiple hbm2ddl executions to run separatedly?

We deploy our JavaEE applications as WARs in multpile Wildfly-servers. As persistence-framework we use JPA with Hibernate as implementation. To garantee a matching DB-Schema to our entity-classes we have the following entry in our…
boutta
  • 24,189
  • 7
  • 34
  • 49
0
votes
1 answer

Does hbm2ddl.auto=update not honor different DB users, maybe?

We are encountering strange hibernate behavior with hbm2ddl.auto set to update. In our test setup, we have two database users, one containing the tables for our beta application, the other one is mainly used for development. I.e. same table names…
PeterP
  • 119
  • 1
  • 8
0
votes
2 answers

ClassNotFoundException javax.mail.internet.AddressException when running hibernate3:hbm2ddl

So I'm having trouble with log4j and hbm2ddl. When I put an SMTPAppender in my log4j.xml I get this ClaasNotFoundException. Any Hints on how to solve this? These are my config files and the stacktrace: stackctrace: [INFO] Scanning for…
DBC
  • 41
  • 1
  • 3
0
votes
0 answers

Migration from Hibernate 4 to 5 and foreign keys with hbm2ddl.auto set to update

I'm migrating my application from Hibernate 4 to 5. When I set the hibernate property hibernate.hbm2ddl.autoto update (needed to make the envers work) I receive a bunch of errors saying: Caused by: com.microsoft.sqlserver.jdbc.SQLServerException:…
SG87
  • 79
  • 12
0
votes
3 answers

hbm2ddl.auto= create/create-drop will it remove data also?

In Hibernate if we set hbm2ddl.auto to create/create-drop , then it will delete the old schema and create the new schema when starts. It means, it will delete data also?.. My doubt is if it deletes every thing then how could we retrive the old data?…
Rajesh G
  • 1
  • 1
  • 1
0
votes
1 answer

hbm2ddl.auto update and new boolean property added to an existing table with records

I have a mapped entity with JPA in a PostgreSQL database. The table exists and I have some records in it, now I want to add a simple new boolean (not Boolean) property. In logs I can correctly see the alter table using not null because I chose…
Gamby
  • 585
  • 1
  • 6
  • 22
0
votes
1 answer

Where can I get the map of PersistentClass objects that was under org.hibernate.cfg.Configuration in Hibernate 5?

In Hibernate 3, in the org.hibernate.cfg.Configuration class there is a Map classes property that contains objects of type org.hibernate.mapping.PersistentClass. In a Grails application (which uses hibernate underneath the covers) I was extending a…
Viriato
  • 2,981
  • 7
  • 40
  • 54
0
votes
1 answer

Automatic Hibernate index creation too long

I am back with a bug/problem that came to sunlight now. Usually I test the local development and changes on an H2DB but as I know, this has to work on Oracle and MSSQL too. Now testing on oracle again this problem occurred: The Key…
Nico
  • 1,727
  • 1
  • 24
  • 42
0
votes
1 answer

How to create tables with hibernate recomandations

I'm relatively new to hibernate technology, and want to create an application with that. I have read that is not recomanded to use "hibernate's creation tabels" option (hibernate.hbm2ddl.auto) for a production environment. Does that mean that i need…
artaxerxe
  • 6,281
  • 21
  • 68
  • 106
0
votes
2 answers

Invalid Mapping Exception in hibernate.hbm.xml

I am posting my hbm file with the cfg file along with my error log. I found my questions based on similar problems are tried out their solution too but still my error is not fading away. log Initial SessionFactory creation …
Loren
  • 320
  • 1
  • 10
  • 25
0
votes
1 answer

hbm2ddl schema export fails due to 'Schema "XYZ" no found'

I am trying to export a DDL to a PostgreSQL 9.4 database during start up of Wildfly 8.2.1 using Hibernate 4.3.11. The DDL was created using hibernate-maven-plugin (http://juplo.de/hibernate-maven-plugin/), and looks like this: alter table…
Walter
  • 396
  • 1
  • 5
  • 16
0
votes
1 answer

hbm2dll java.lang.ExceptionInInitializerError

I'm trying to use the ant taks hbm2dll but every time I try to execute it, I have a java.lang.ExceptionInInitializerError. Here's my ant task:
Jérèm Le Blond
  • 645
  • 5
  • 23