简体   繁体   中英

the entity manager is recreating the tables

My problem is with the entity manager every time i excute my application it drops tables and the creates them. I want to retrive data from the data base so how to prevent it from creating new tables? thanks

For hibernate, set your hibernate.hbm2ddl.auto propery in persistence.xml to validate.

For eclipselink, use the eclipselink.ddl-generation property to NONE .

This will prevent the EntityManager from dropping the schema with every execution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM