实体自包含的设计模式思考
public class Case{
private List<Case> cases;
}
或者状态模式:
public class Case{
@OneToMany
private List<CaseState> states;
}
public class CaseState{
@OneToone
private Case case
}
public class Case{
private List<Case> cases;
}
public class Case{
@OneToMany
private List<CaseState> states;
}
public class CaseState{
@OneToone
private Case case
}