I'm using MongoDB from Java and I've got this line to retrieve some data:
@Query("{'buyerId': ?0, 'status': ?1 }")
Page<CardOrder> getBuyerOrders(final String profileId, final Pageable pageable);
I'd like to sort them by the field 'created'.
{"created": 1}
How can I merge those two queries in the @Query annotation?
(i.e @Query("{'buyerId': ?0, 'status': ?1 }{"created": 1}"))
Thanks.