title: spring data jpa on timestamp field for current date?
body: <p>I have to query on timestamp field for current date and get only 1 record. 
  I can write the query like:</p>
  
  <pre><code>@Query("Select i From Log i Where i.createdBy = :userId And DATE(i.createdDate) = CURRENT_DATE")
  </code></pre>
  
  <p><strong>JPA Entity:</strong></p>
  
  <pre><code>@Entity
  @Table(name = "log")
  public class Log {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "log_id")
      private Long logId;
  
      @Column(name = "address")
      private String address;
  
      @Column(name = "created_date", updatable = false)
      @Temporal(TemporalType.TIMESTAMP)
      @DateTimeFormat(style = "yyyy-MM-dd HH:mm:ss")
      private Calendar createdDate;
  
      //SETTERS AND GETTERS
  }   
  </code></pre>
  
  <p><strong>TABLE:</strong></p>
  
  <pre><code>CREATE TABLE `log` (
      `log_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
      `address` VARCHAR(30) NOT NULL,
      `created_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
      PRIMARY KEY (`log_id`)
  )
  ENGINE=InnoDB
  ;
  </code></pre>
  
  <p>here i am not able to limit the records, 
  I know we can limit the records by sending Pageable, but again i have to get the record from list.</p>
  
  <p>Is there any way to do this ?
  how can we do it in spring data jpa method name ?</p>