摘要:
主键一对一数据库表结构Student.java 1 @Entity 2 @Table(name = "student") 3 public class Student { 4 @Id 5 @Column(name = "id") 6 @GenericGenerator(nam... 阅读全文
摘要:
数据库表结构Student.java 1 @Entity 2 @Table(name = "student") 3 public class Student { 4 @Id 5 @Column(name = "id") 6 @GenericGenerator(name = "... 阅读全文
摘要:
数据表结构单向一对多Student.java 1 @Entity 2 @Table(name = "student") 3 public class Student { 4 @Id 5 @Column(name = "id") 6 @GenericGenerator(name... 阅读全文
摘要:
Hibernate3.0后新增了annotation的配置方式,比起xml有着更加简洁的配置1:修改hibernate.cfg.xml之前标签中配置了hbm资源文件由于现在使用了注解方式代替了hbm文件,所以需要修改mapping标签的内容2:User.java 1 @Entity 2 @Table... 阅读全文