我的Entity
样子
@Entity
public class Market extends MutableEntity {
@Column(nullable = false)
private String name;
@Column
private String description;
@Embedded
private Version marketVersion; ..snipped
其中@Embedded Version
有
@Embeddable
public class Version {
private String number;
private VersionType versionType;
private DateTime publishedOn;
private DateTime retiredOn;
private Version parentVersion;
但这失败了
08:12:23.481 [main] DEBUG o.h.cfg.annotations.PropertyBinder - Building property number
08:12:23.481 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3Column{table=org.hibernate.mapping.Table(Market), mappingColumn=parentVersion, insertable=true, updatable=true, unique=false}
java.lang.StackOverflowError
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
at org.hibernate.cfg.AbstractPropertyHolder.getExactOverriddenColumn(AbstractPropertyHolder.java:179)
为什么会发生这种情况,我该如何解决这个问题?