Is there how I could programmatically ask eclipsel

2019-05-13 15:56发布

This helps in unit testing.

2条回答
Ridiculous、
2楼-- · 2019-05-13 16:25

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

查看更多
Fickle 薄情
3楼-- · 2019-05-13 16:29

The following should work for you:

ServerSession session = entityManager.unwrap(ServerSession.class);  
SchemaManager schemaManager = new SchemaManager(session);  
schemaManager.replaceDefaultTables(true, true);
查看更多
登录 后发表回答