不知道为什么,我把主键设置为uuid.hex 就没反应,不报错 就是插入不了数值, 但是换成native马上就可以
请问各位,这究竟是为什么??
drop table person;
   create table person(
   
    id varchar(32) not null primary key,
    
    name varchar(20) not null,
    
    password varchar(20) not null 
  
   );
   
   commit;调用代码:
public static void main(String[] args) {  ApplicationContext ctx=null;
 
 ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
         PersonDAOImpel pdl=(PersonDAOImpel)ctx.getBean("persondao");
         
         Person per=new Person();
      
         per.setName("张三");
         per.setPassword("454654");
         pdl.insert(per);

}
实现代码:
package com.guoc.ssh.impel;import org.springframework.orm.hibernate3.support.HibernateDaoSupport;import com.guoc.ssh.vo.Person;public class PersonDAOImpel extends HibernateDaoSupport {   public void insert(Person per){
  this.getSession().save(per);

  }


}