title: JPA Repository.findById() returns null but the value is exist on db
body: <p>I'm developing Spring boot project, using JPA.</p>
  <p>What I wanna know is repository.findById(id) method returns null, whereas data is available in the DB.</p>
  <p>Functions <code>save()</code> and <code>findAll()</code> are working fine. When I ran the same code on junit test environment, but it completely worked. If the data is hard coded, like <code>memberRepository.findById(&quot;M001&quot;);</code>, it working fine.</p>
  <h2>Entity</h2>
  <pre><code>@Entity
  @Table(name=&quot;df_member&quot;)
  public class DfMember {
      
      @Column(name=&quot;member_type&quot;)
      private String memberType;
  
      @Id
      @Column(name=&quot;id&quot;)
      private String id;
      
          ...columns...
          ...Getters/Setters.....
  </code></pre>
  <h2>Controller</h2>
  <pre><code>    @ResponseBody
      @RequestMapping(value=&quot;/checkIdDuplicate&quot;, method=RequestMethod.POST)
      public boolean checkIdDuplicate(@RequestBody String id) {
  
         return memberService.isExistByUserId(id);
      }
  </code></pre>
  <h2>MemberService</h2>
  <pre><code>    public boolean isExistByUserId(String id) {
          Optional&lt;DfMember&gt; member = memberRepository.findById(id);
          return member.isPresent();
      }
  </code></pre>
  <h2>Repository</h2>
  <pre><code>public interface MemberRepository extends CrudRepository&lt;DfMember, String&gt; {
      
  }
  </code></pre>
  <p>Should return Member Object but it's null.</p>