title: Something strange with mybatis and isnull on BigDecimal with Sybase
body: <p>Day ago I found something strange behavior in my code after adding new implementation of interface. <p>I see mybatis update return -1 always, and table not updated.</p>
  Log told me about some interesting behavior:</p>
  
  <ul>
  <li>Creating a new SqlSession</li></li>
  <li>SqlSession [...] was not registered for synchronization because synchronization is not active</li>
  <li>JDBC Connection [...] will not be managed by Spring</li>
  <li>==>  Preparing: update Card set amount=isnull(?, amount), name=isnull(?, name), balanceTime=isnull(?, balanceTime) where number=? and clientId=?.</li>
  <li>==> Parameters: 0.00(BigDecimal), Test Card(String), 2017-02-22 09:05:24.78(Timestamp), 0000000000000000(String), 111000(Long)</li>
  <li>Closing non transactional SqlSession [...]</li>
  </ul>
  
  <p>After sending parameters to server nothing happened.
  This happens after my DAO was refactored :</p>
  
  <pre><code>public class DBaseCard{
      private long id;
      private String number;
      private String name;
      private BigDecimal amount; // was Double
      .....
  }
  </code></pre>
  
  <p>In production I use Sybase IQ. For test I use H2 db and for it, all works fine.</p>
  
  <p>If I change "amount" field type to Double, all works fine.</p> 
  
  <p>If I leave BigDecimal type and replace "amount=isnull(#{card.amount}, amount)" to "amount=#{card.amount}" or something like "amount=isnull(0.00, amount)" all works fine, and in log I see:
  </p>
  
  <ul>
  <li>==> Parameters: 0.0(BigDecimal), ....</li>
  <li>&lt;==    Updates: 1</li>
  </ul>
  
  <p>Please, help me understand why this happen.</p>