This helps in unit testing.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The following should work for you:
ServerSession session = entityManager.unwrap(ServerSession.class);
SchemaManager schemaManager = new SchemaManager(session);
schemaManager.replaceDefaultTables(true, true);
回答2:
One way to do that is to execute the sql scripts eclipselink generates specifying:
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
in persistence.xml