Abu Bakar Siddik
Abu Bakar Siddik

Reputation: 527

How to create method name using After and Equals in Spring Data JPA?

I need your help to my problem. I can't create method name following this documentation. I want to query date by this method.

I want like this query :

    SELECT * FROM app_basic where app_end_date>='2016-11-29';

In following Spring documentation After keyword work fine. But I need After and Equals in method name convention using Spring Data jpa.

So, how can I create this method ? Please, help me.

Thanks.

Upvotes: 32

Views: 17531

Answers (1)

eltabo
eltabo

Reputation: 3807

You can use LessThan, GreaterThan, LessThanEqual, GreaterThanEqual also with dates.

Hope it helps.

Upvotes: 65

Related Questions