hibernate utility to manage the creation and/or deployment of database schemas (data definition language)
Questions tagged [hbm2ddl]
198 questions
0
votes
1 answer
liquibase - how to alter table to make a existing constraint unique?
I’m using hibernate4 hbm2ddl to check a mysql schema is up to date. It is telling me table needs changed :
alter table ems.FooMetaData
drop constraint UK_jbjctqk7dys3q0xr5brfsdjvv
alter table ems.FooMetaData
add constraint…

k1eran
- 4,492
- 8
- 50
- 73
0
votes
0 answers
On server startup hibernate is altering table by adding new columns
On server startup hibernate is altering table by adding new columns. When It prints in console that "schema update complete" table is altered.!
I have a table which has few fields of Number type. But when i am starting my tomcat from eclipse,…

Anup Mondal
- 47
- 1
- 8
0
votes
1 answer
Re-create H2 schema in Hibernate programatically
I'd like to use an in-memory db (H2) to preprocess, validate, etc some import-data before persisting it to the "real" production database. Prior to each import I'd like to recreate the H2 schema to have a clean database, as with…

maria vill
- 1,014
- 1
- 7
- 11
0
votes
1 answer
Hibernate - Edit code generated by hbm2ddl.auto property
Is there any way to edit the code generated by the tool hbm2ddl.auto from Hibernate? I ask this because I would like to insert the words ORGANIZE BY ROW in the CREATE TABLE statements generated by hibernate tool.

Islon
- 5
- 4
0
votes
1 answer
How does Hibernate hbm2ddl automatically create table?
I am reading an example of Java EE (JBoss) application, and learning the basics of Hibernate in Java EE. Under src/main/resources/META-INF/persistence.xml:
java:jboss/datasources/MemberDS
…

user697911
- 10,043
- 25
- 95
- 169
0
votes
1 answer
Automatic hibernate schema creation not working (junit+spring)
I am running a JUnit test case with the following spring config. THe automatic schema creation is not happening.
@Configuration
public class DatabaseConfiguration {
@Bean
DataSource dataSource() {
BasicDataSource ret = new…

S V
- 570
- 8
- 21
0
votes
1 answer
How can I specify the generated column name in the DDL for my derived identifier with JPA2?
We have codes in a database that have a compound identifier (here category+code), and code parameters in another table that have the same two identifiers + a parameter name (so category+code+name)
We use @IdClass for the identifiers. Here is the…

Yotus
- 264
- 1
- 4
- 17
0
votes
2 answers
How to keep hibernate3-maven-plugin HBM2DDL from printing to console
I used the hibernate3-maven-plugin to automatically create a SQL script I can use to create a database schema in a new database. I do this via the hbm2ddl tool. I thought that when I instructed it to write the SQL to a file it would stop…

Dave
- 21,524
- 28
- 141
- 221
0
votes
1 answer
unable to generate ddl scripts using maven hibernate plugin (hbm2ddl goal)
I have read few posts including this one on getting hbm2ddl to work. I get the following error when I run mvn hibernate3:hbm2ddl
No suitable driver found for jdbc. I have mysql connector as dependency in pom.xml. Here is the complete maven…

brain storm
- 30,124
- 69
- 225
- 393
0
votes
1 answer
How to output two ddl files at the same time with using maven hbm2ddl plugin
Our application needs to use two different kinds of databases.One is oracle, the other is mysql and we want to use maven plugin hbm2ddl to generate the ddl file, and want to output the two ddl files at the same time, I don't know how to set the…

Daniel Cai
- 53
- 1
- 3
0
votes
1 answer
Hibernate Persist Object Hieararchy Not Working- AppFuse
It is been a long time I hung up in the following issue. I have a one to many relationship and I am generating the database according to the model using Hibernate. It gives the following error. But it seems I am doing it correct and nothing wrong…

diyoda_
- 5,274
- 8
- 57
- 89
0
votes
0 answers
hbm2ddl.auto is not creating schema automatically when set to create
I have set hbm2dll.auto property to create in my configuration file.
create
Whenever I create SessionFactory it drops the table if already created but it is not recreating the table causing my…

vatsal mevada
- 5,148
- 7
- 39
- 68
0
votes
1 answer
How to qualify sequence names in Hibernate?
I'm having troubles when generating sequences for an oracle databese running under the same instance than other one, with the same data structure. Here is a fragment of my persistence.xml where I define different schemas according to the persistence…

Daniel Chaves
- 304
- 3
- 11
0
votes
1 answer
persisting hyperjaxb-generated entities to mysql from eclipse
I am setting up hyperjaxb to run in eclipse using this tutorial. So far, I have gotten it to marshal and unmarshal, but it does not yet trigger hbm2ddl to create the tables in the database, and it is not clear where in the eclipse directory…

CodeMed
- 9,527
- 70
- 212
- 364
0
votes
1 answer
Why isn't hbm2ddl.import_files working in hibernate4-maven-plugin (Hibernate 4.3.6)?
I have the following persistence.xml:

Steve Chambers
- 37,270
- 24
- 156
- 208