Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ddl for differences between two (versions of a) JPA configuration

 
Gijs Mollema
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I was wondering if the following is possible:
I have two versions of a JPA configuration (version 1 and 2). I know it is possible to generate ddl with hbm2ddl for each individually, but is it possible generate an update ddl (file) script for 2 based on 1 (either in java or some tool?)

Thanks in advance.

Cheers,
Gijs Mollema
p.s. Is SchemUpdate or SchemaExport (of hbm2ddl) an option?
[ August 29, 2008: Message edited by: Gijs Mollema ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In answer to your question directly. the answer is No.

But what if you have one of the config files create and the other just update. Maybe that will work, but I doubt it.

Mark
 
Gijs Mollema
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a follow up on what I have found.

It turns out the hibernate tools (hbm2ddl) can de an update between databases (also on JPA config) however not to file (as sql).

LiquiBase was the answer. However it does not support JPA yet (working on it) I managed to get a diff ddl between two databases and it exports it smoothly to sql file (ddl AND dml )
So if you are interested you should look up www.liquibase.org

Cheers,
Gijs
[ September 08, 2008: Message edited by: Gijs Mollema ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic