问题:设置了dynamic-update, 可是事实上并没有按照期望进行了update。

案例代码如下:

1、持久化对象

 1 package com.jdw.hibernate.entities;
 2 
 3 import java.util.Date;
 4 
 5 public class News {
 6     private Integer id;
 7     private String title;
 8     private String author;
 9     private Date date;
10 
11     public News() {
12         // TODO Auto-generated constructor stub
13     }
14 
15     public News(String title, String author, Date date) {
16         super();
17         this.title = title;
18         this.author = author;
19         this.date = date;
20     }
21 
22     @Override
23     public String toString() {
24         return "News [> author
25                 + ", date=" + date + "]";
26     }
27 
28     public Integer getId() {
29         return id;
30     }
31 
32     public void setId(Integer id) {
33         this.id = id;
34     }
35 
36     public String getTitle() {
37         return title;
38     }
39 
40     public void setTitle(String title) {
41         this.title = title;
42     }
43 
44     public String getAuthor() {
45         return author;
46     }
47 
48     public void setAuthor(String author) {
49         this.author = author;
50     }
51 
52     public Date getDate() {
53         return date;
54     }
55 
56     public void setDate(Date date) {
57         this.date = date;
58     }
59 }
View Code

相关文章:

  • 2022-12-23
  • 2021-10-29
  • 2021-09-20
  • 2021-11-29
  • 2022-02-02
  • 2022-02-10
  • 2022-12-23
  • 2021-04-27
猜你喜欢
  • 2022-12-23
  • 2021-06-21
  • 2021-06-30
  • 2022-03-09
  • 2021-07-28
  • 2022-12-23
相关资源
相似解决方案