Hibernate不允许在使用 @Embeddable
注解标记的类中使用集合映射,会产生如下异常:
Exception in thread "main" org.hibernate.AnnotationException: @OneToMany, @ManyToMany or @ElementCollection cannot be used inside an @Embeddable that is also contained within an @ElementCollection: ...
at ...