<many-to-one name="customerNo"
                     column="customerNo"
                     class="vo.CustomerInfo" not-null="true"/>
customerNo是定义在vo.UseInfo的vo.CustomerInfo类的对象不?名称看起来象个int

解决方案 »

  1.   

    在CustomerInfo中是这样的。
    public abstract class AbstractCustomerInfo  implements java.io.Serializable {
        // Fields         private Integer id;
         private String customerNo;
         private String customerName;
         private String address;
         private String phone;
         private String contact;
         private String postCode;
         private String cityCode;
         private String w;
         private String oldName;
         private Short state;     private Set useSoft=new HashSet();在UseInfo中是这样的
    public abstract class AbstractUseInfo  implements java.io.Serializable {
        // Fields         private Long id;
         private CustomerInfo customerNo;
         private String softNo;
         private Date buyDate;
         private Long price;
         private String sendNo;
         private String transactor;
         private String memo;
         private String w;
         private Short isPay;
         private String qsNf;小弟刚刚开始学,不知道对不对?
      

  2.   

    谢谢yangxccom(康头) 提醒,弄对了。因为我的主键不customerNo的原因。另外:书上说单向的一对多关联只需在"一"方进行配置,是不是意味着多方什么也不用配置就可以了?