title: Hibernate MS-SQL Wrong column type Found: decimal, expected: float
body: <p><strong>Note: Answer at end of question</strong></p>
  
  <p>I have created some columns in my My SQL database and have evidently not created floating point before because I had to look it up. For SQL compliance, I created my columns thus:</p>
  
  <p>ALTER TABLE sensor
  ADD Field1_Calibration_Offset DECIMAL(4, 3);</p>
  
  <p>Times 8 for each column.</p>
  
  <p>I have defined these in my java code such:</p>
  
  <p>@Column(name = "FIELD1_CALIBRATION_OFFSET")
  private Float           field1CalibrationOffset;</p>
  
  <p>which generated the error:</p>
  
  <p>Wrong column type in PsDb.dbo.Sensor for column FIELD1_CALIBRATION_OFFSET. Found: decimal, expected: float</p>
  
  <p><strong>Final Answer</strong></p>
  
  <p>Following @jbrookover's answer below, I changed to BigDecimal, I got:</p>
  
  <pre><code>Wrong column type in PsDb.dbo.Sensor for column FIELD1_CALIBRATION_OFFSET. Found: decimal, expected: numeric(19,2)
  </code></pre>
  
  <p>So I looked up my hibernate mappings and did:</p>
  
  <pre><code>@Column(name = "FIELD1_CALIBRATION_SCALE", columnDefinition="decimal", precision=4, scale=3)
  private BigDecimal field1CalibrationScale;
  </code></pre>