我试图让这个映射工作,但我收到这个奇怪的异常消息
Could not determine type for: foo.ProcessUser, at table: ProcessUser_onetimeCodes, for columns: [org.hibernate.mapping.Column(processUser)]
@Entity
public class ProcessUser {
@Setter
private List<OnetimeCodes> onetimeCodes;
@CollectionOfElements
public List<OnetimeCodes> getOnetimeCodes() {
return onetimeCodes;
}
}
@Embeddable
@Data
public class OnetimeCodes {
@Parent
private ProcessUser processUser;
@Column(nullable=false)
@NotEmpty
private String password;
public OnetimeCodes(ProcessUser processUser, String password) {
this.processUser = processUser;
this.password = password;
}
}
谁能发现这里有什么问题?我hibernate.hbm2ddl.auto
有create