title: How to solve the value of not null in database when JPA is updating？
body: <pre><code>CREATE TABLE `user_info` (
  `user_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nickname` varchar(40) NOT NULL,
  `email` varchar(100) 
  )
  </code></pre>
  
  <p>this my database table，database have A record  id=1, nickname=test, email=null</p>
  
  <pre><code>UserInfo info = new UserInfo();
  info.setUserInfoId(1);
  info.setEmail("hello@hotmail.com");
  </code></pre>
  
  <p>When I update with the above code, an error Column 'nickname' cannot be null occurs！</p>
  
  <p>I know this is because JPA has to perform a lookup first, but I don't want to give JPA all the values that can't be empty when updating the operation. </p>
  
  <p>Additional explanation:</p>
  
  <p>Assuming that my front end only sends me ID and email, how can I update it? Use SQL is feasible, but JPA must require nickname not null</p>
  
  <p>How to solve this problem?
  thx</p>