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

[JPA - Hibernate] create-drop config

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I am fine tuning my domain model and mappings I'd really like my tables to be destroyed and recreated every time my app runs. I'm using JPA-Hibernate-Spring combo and I can't seem to get the config right to do this for me. I've tried this in the persistence.xml file:



But no go. I'm not sure where I would put it in the jpaVendorAdapter section of my spring configuration. I've tried several things there that don't work. Any suggestions?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
turns out I had a misunderstanding of what create-drop actually does. I was able to make this work using the following config in applicationContext.xml:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic