gaojingsong的博客 -凯发k8国际

`
gaojingsong
  • 浏览: 1124910 次
  • 性别:
  • 来自: 深圳
博主相关
  • 博客
  • 微博
  • 相册
  • 收藏
  • 文章分类
    社区版块
    • ( 4)
    • ( 0)
    • ( 80)
    存档分类
    最新评论
    文章列表
    1、修改数据库配置                   org.gjt.mm.mysql.driver         jdbc:mysql://127.0.0.1:8066/testdb
    1、hibernate增删改查源码如下: package cn.com.test.hibernatedemo; import org.hibernate.hibernateexception; import org.hibernate.session; import org.hibernate.transaction; import cn.com.vo.hibernatedemo.uservo; /** * hello world! * */ public class app { public static void main(string[] ar ...
    本工程是基于maven的hibernate项目, 1、配置hibernate.cfg.xml文件 & ...
    1、自动增长identity 适用于mysql、db2、ms sql server,采用数据库生成的主键,用于为long、short、int类型生成唯一标识 .使用sql server 和 mysql 的自增字段,这个方法不能放到 oracle 中,oracle 不支持自增字段,要设定sequence(mysql 和 sql s ...
    1、hibernate中对象三态 在hibernate中,对象有三种状态:临 时状态(transient)、持久状态(persistent)和游离状态(detached)。 处于持久态的对象也称为 po(persistenceobject),临时对象和游离对象也称为vo(valueobject).  1)临时状态  由 new命令开辟内存空间的java对象,例如: user user=new user(); 临 时对象在内存孤立存在,它是携带信息的载体,不和数据库的数据有任何关联关系. (a) 如 果没有变量对该对象进行引用,它将被gc回收; (b) 在hibernate中,可 ...
      1、hibernate运行过程: 1.通过configuration().configure();读取并解析hibernate.cfg.xml配置文件 2.由hibernate.cfg.xml中的读取并解析映射信息 3.通过config.buildsessionfactory();//创建sessionfactory 4.sessionfactory.opensession();//打开sesssion 5.session.begintransaction();// ...
    global site tag (gtag.js) - google analytics
    网站地图