title: Hibernate saveOrUpdate, update needs all fields of original row
body: <p>I am using mysql and hibernate to insert and update rows in a table. I use saveOrUpdate call. Now, When I try to update a row in a table, I get a exception. Exception states that my column requestTime cannot be null. Obviously its true since I have setup the column property to be NotNull.</p>
  
  <p>I am able to add the row. But when update it with values of 2 more columns, I get this exception.</p>
  
  <p>I am assuming that when I update, I need to read the row from the table, and update the entire row. Is that true ? I was kinda hoping that hibernate saveOrUpdate would do it for me. So I have a Object that has getters for all the columns when I insert a new row. But when I update I have a Object that only has getters for the primary key and new columns.</p>
  
  <pre><code>Transaction txD;
  Session session;
  session = currentSession();
  txD = session.beginTransaction();
  session.saveOrUpdate(dataStore);
  txD.commit();
  </code></pre>
  
  <p>Exception</p>
  
  <pre><code>749368 [Thread-2] DEBUG org.hibernate.internal.util.EntityPrinter  - com.mcruiseon.carpool.concrete.SubscribeProviderConcrete{acceptedTime=Mon Jul 30 03:39:23 UTC 2012, requestTime=null, subscriberIdentityHash=1218553253, requestIdentity=167093126, subscribedProviderHash=-284086361, isAccepted=true}
  749375 [Thread-2] DEBUG org.hibernate.SQL  - update carPoolSubscribedProvider set subscriberIdentityHash=?, requestTime=?, subscribedProviderHash=?, isAccepted=?, acceptedTime=? where requestIdentity=?
  749398 [Thread-2] DEBUG org.hibernate.engine.jdbc.spi.SqlExceptionHelper  - Column 'requestTime' cannot be null [n/a]
  com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'requestTime' cannot be null
  </code></pre>
  
  <p>select * from carPoolSubscribedProvider</p>
  
  <pre><code>+-----------------+------------------------+---------------------+------------------------+------------+--------------+
  | requestIdentity | subscriberIdentityHash | requestTime         | subscribedProviderHash | isAccepted | acceptedTime |
  +-----------------+------------------------+---------------------+------------------------+------------+--------------+
  | 167093126       | -284086361             | 2012-07-27 16:13:19 | 1218553253             |          0 | NULL         |
  +-----------------+------------------------+---------------------+------------------------+------------+--------------+
  </code></pre>
  
  <p>Edit : </p>
  
  <pre><code>| carPoolSubscribedProvider | CREATE TABLE `carPoolSubscribedProvider` (
    `requestIdentity` varchar(50) NOT NULL DEFAULT '',
    `subscriberIdentityHash` varchar(100) NOT NULL,
    `requestTime` datetime NOT NULL,
    `subscribedProviderHash` varchar(100) DEFAULT NULL,
    `isAccepted` tinyint(1) DEFAULT '0',
    `acceptedTime` datetime DEFAULT NULL,
    PRIMARY KEY (`requestIdentity`),
  </code></pre>