title: how can save a double type correctly in grails?
body: <p>basically the domain to save not respect the floating point, as it makes it to another format</p>
  
  <p>i have the next domain</p>
  
  <pre><code>class Location {
      double latitude
      double longitude
      static belongsTo=[ product: Product ]   
      static constraints = {      
          latitude nullable:false, blank:false
          longitude nullable:false, blank:false       
      }
  }
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>&lt;g:form class="form-horizontal" action="create" id="${locationInstance?.product?.id}" &gt;
      &lt;fieldset&gt;
          &lt;f:with bean="locationInstance"&gt;
              &lt;f:field property="lat"/&gt;
              &lt;f:field property="lon"/&gt;
          &lt;/f:with&gt;
      &lt;/fieldset&gt;
  &lt;/g:form&gt;
  &lt;button type="button" class="submit btn btn-primary"&gt;
          &lt;i class="icon-plus"&gt;&lt;/i&gt;
          &lt;g:message code="default.add.label" args="[message(code: 'location.label', default:'Location')]" default="Add Map"/&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>import grails.converters.JSON
  class LocationController {
      def create() {
      def model = [productInstance:Product.findByIdAndUser(params.remove("id"),negoexService.currentUser)]
      def responseReturn = [success:false]
      def redirectParams = [controller:"product", action:"list"]
      if (!model.productInstance) {
          responseReturn.message = message(code: "default.not.found.message", args: [message(code: "product.label", default: "Product"), params.id])
      }else{
          redirectParams.action = "edit"
          redirectParams.id = model.productInstance.id
          params.product = model.productInstance
          params.remove("action")
          params.remove("controller")
          model.locationInstance = new Location(params)
          println params // here are showed 29.089177 and -110.961227
          println model.locationInstance.lat // out is 2.9089177E7
          println model.locationInstance.lon // out is -1.10961227E8
          if(request.method=="POST"){
              if (model.locationInstance.save(flush: true)) {
                  responseReturn.success = true
                  responseReturn.message = message(code: "default.created.message", args: [message(code: "location.label", default: "Location"), model.locationInstance])
              }else{
                  responseReturn.errors = model.locationInstance.errors.allErrors
              }
          }
      }
      withFormat {
          html {
              if(request.xhr &amp;&amp; !model.productInstance){
                  render view:"/messageAjax", model:responseReturn
              }else{
                  if(responseReturn.message){flash.message = responseReturn.message}
                  if(!model.productInstance || responseReturn.success){
                      redirect redirectParams
                  }else{
                      render view:"create"+(request.xhr?"Ajax":""), model:model
                  }
              }
          }
          json {render responseReturn as JSON}
          js   {render responseReturn as JSON}
          xml  {render responseReturn as XML}
      }
  }
  </code></pre>
  
  <p>to request Location save()</p>
  
  <p>the params arrive like params.latitude=29.089177 and params.longitude=-110.961227
  after save the values are stored like locationInstance.latitude=29089177 and locationInstance.longitude=-110961227 in the data base.</p>
  
  <p>To be showed in a view appears like latitude=2.9089177E7 and longitude=-1.10961227E8</p>
  
  <p>what would be the problem, i have another project with theme class and run correctly.
  and try changing the names of the properties and the type to float and not resolved</p>
  
  <p>Thanks!</p>