我正在使用@ElementCollection作为自定义对象列表
@ElementCollection
@CollectionTable(name = "choice", joinColumns = @JoinColumn(name = "itemId"))
@OrderColumn(name = "index")
private List<Choice> choices = new ArrayList<Choice>();
Run Code Online (Sandbox Code Playgroud)
我已经创建了这样的Choice类
//@Embeddable
@Table(name = "choice")
@Cacheable(false)
@Audited
public class Choice implements Serializable{
Run Code Online (Sandbox Code Playgroud)
如果我使用@Embeddable注释,我会得到 org.hibernate.MappingException: Type not supported for auditing: org.hibernate.type.ComponentType
我是JPA的新手.有什么我想念的吗?
| 归档时间: |
|
| 查看次数: |
6005 次 |
| 最近记录: |