title: spring data jpa selecting values considering the date and time
body: <p>I have an entity which is </p>
  
  <pre><code>@AllArgsConstructor
  @NoArgsConstructor
  @Data
  @Entity
  @Table(name = "REFRESH_TOKENS")
  public class JwtRefreshToken {
      @Id
      @Column(name = "TOKEN")
      private String token;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "USER_ID", nullable = false)
      private Tbluser user;
  
      @Column(name = "EXPIRATIONDATETIME")
      private LocalDateTime expirationDateTime;
  
      public JwtRefreshToken(String token) {
          this.token = token;
      }
  
  }
  </code></pre>
  
  <p>and the the corresponding repository is </p>
  
  <pre><code>    JwtRefreshToken findByTokenAndAndExpirationDateTimeBefore( String token, @Param("expirationDateTime")  LocalDateTime localDateTime);
  </code></pre>
  
  <p>The interesting thing here is the query always returns value even though the time has exceeded.</p>
  
  <p>for example the value stored in database is 2019-04-21 22:33:08 </p>
  
  <p>and my current date time is 2019-04-21T23:02:43.971
  but yet the above <code>findByTokenAndAndExpirationDateTimeBefore</code>  returns value.</p>
  
  <p>i want to compare the time as well.</p>