处理一些遗留的休眠代码。
如何使用 hbm.xml(休眠映射文件)而不是注释来执行以下操作?
@Table(name="users", uniqueConstraints = {
@UniqueConstraint(columnNames={"username", "client"}),
@UniqueConstraint(columnNames={"email", "client"})
})
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private int id;
private String username;
private String email;
private Client client;
}