0

My question is that if the tables are removed for whatever reason, is it possible to automatically add tables at runtime before object to table.

Thanks

6
  • What do you mean by adding an entity? Persisting an instance of some @Entity class? Commented Mar 1, 2018 at 17:58
  • Hi I mean an object / row to the database, sorry for confusion Commented Mar 1, 2018 at 17:58
  • Start here, if you mean table auto generation. BUT: this does not work to my knowledge without redeploy/container restart. I mean if your app is running and table removed it is not generated again automagically this way. Commented Mar 1, 2018 at 18:02
  • Look up the persistence property javax.persistence.schema-generation.database.action, with a value of "create" Commented Mar 1, 2018 at 18:03
  • Hi I am already using a similar property <property name="eclipselink.ddl-generation" value="create-tables"/>. But basically you are spot on @pirho, is there a way if the table is removed to be generated again? Commented Mar 1, 2018 at 18:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.