hibernate
jmshtdxnbz
这个作者很懒,什么都没留下…
展开
-
hibernate学习
1、新建web项目2、src目录下增加hibernate.cfg.xml jdbc:mysql://localhost:3306/oa root root com.mysql.jdbc.Driver create 3、导入核心包:antlr-2.7.6.jar;asm.jar;asm-attrs.jar;...原创 2010-10-26 16:54:04 · 69 阅读 · 0 评论 -
hibernate学习3
继承映射父类Product(int id, String name)子类一Book(int pageCount)子类二Clothes(int size)第一种方法创建两个表,同普通映射一样Book (id,name,pageCount)Clothes(id,name,size)第二种,每个子类对应一张子表,并与主类共享主表,子表与主表通过外键关联Prod...原创 2010-11-04 11:18:41 · 78 阅读 · 0 评论