title: How do Grails dynamic finders handle types?
body: <p>I'm a bit confused about what is happening when I give a Grails dynamic finder the wrong type.</p>
  
  <p>For instance, if I have class <code>Foo</code></p>
  
  <pre><code>class Foo {
      //long id (implicit id is a long)
      Long barValue
  }
  </code></pre>
  
  <p>And I do, <code>Foo.findByIdAndBarValue('1', '2')</code>, I get a result, but I am confused about what is going on here with the string values. </p>
  
  <p>Is it passing these string values directly to the db (potentially ignoring valuable indices due to type mismatch) or is Grails automatically converting the types?</p>