title: When trying to retrieve information from a View using a single parameter in myBatis, the result is null. When using static query, it works
body: <p>I have a code that should retrieve some data from a view on Oracle Database (using mybatis).</p>
  
  <p>It's a dynamic query which receives one parameter</p>
  
  <p>silly code example:</p>
  
  <pre><code>//Repo Class
  @Select("select surname, name from vw_example where name=#{name}")
  @Results({
          @Result(property = "surname", column = "surname"),
          @Result(property = "name", column = "name"),
  
  })
  public List&lt;Result&gt; getSurname(@Param("name") String id)
  </code></pre>
  
  <pre><code>//Test Class
  @Autowired RepoClass repo;
  
  @Test
  public void testGetSurname(){
  List&lt;Result&gt; result = repo.getSurname("Danilo");
  AssertThat(result.size(),is(2));
  }
  </code></pre>
  
  <p>Important thing (In the database I'm working on, the column for name is a CHAR[40] (Please don't ask why.. but I can't change it).</p>
  
  <p>Considering that there are 2 records which contains "Danilo" as value for column "Name" in the Database, it should return 2 rows for me and Map to object "Result".</p>
  
  <p>However, it's not happening. The Assert comes with actual: 0</p>
  
  <p>Now, the crazy thing...</p>
  
  <p>If I change this:</p>
  
  <pre><code>@Select("select surname, name from vw_example where name=#{name}")
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>@Select("select surname, name from vw_example where name='Danilo'")
  </code></pre>
  
  <p>It works like a charm!!</p>
  
  <p>Info:
  (I already tried passing the jdbcType (#{name,jdbcType=CHAR))</p>
  
  <p>(It seems the parameter is being replaced, because I replaced the Select statement for a Insert with the parameter value and it goes fine)</p>
  
  <p>Could someone help with this crazy thing?
  Thank you</p>