【发布时间】:2018-09-21 20:57:46
【问题描述】:
我正在按照here by eclipselink提供的示例进行操作。
当我开始测试时,它失败了:
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: relation "event_history" does not exist.
框架没有像我预期的那样创建表格。我有以下配置:
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
从这个link,我觉得没有必要将DescriptorCustomizer 类添加到persistence.xml 文件中。但我可能错了。
我的问题是,我必须手动创建表吗?或者我做错了什么?我发现的与该功能相关的示例非常糟糕。
【问题讨论】:
-
答案可能在这里..link
标签: jpa eclipselink audit