hibernate中保存一个对象后再设置此对象的属性为什么不需要调用update方法了 例如session.save(user);user.setAge(20); 原因: hibernate对象的三种状态.瞬时态(没有id,不与session关联)持久态(有id,与session关联)托管态(有id,不与session关联) User user = new User();//新建的对象是瞬时态 session.save(user);//save后,user变成持久态 user.setAge(20
项目中要使用动态加载,原计划是生成WWW对象后,放到一个容器里.由一个独立线程轮询容器里的对象,如果www.isDone为true时,回调一个接口把结果交给请求方. new Thread( new ThreadStart( XXX.run ) ); 运行以后出现下面错误: 详细错误: get_isDone can only be called from the main thread.Constructors and field initializers will be executed fr