0
私はスプリングデータでスプリングブートアプリケーションを使用していますSolrCrudrepository
を使用しています。私はProduct
と呼ばれるエンティティを持っています。これはSolrに製品情報を格納するために使用されます。私の質問は、Productreposirory
からすべてのProductIDを取得したいのです。 ProductContentのリストを返すfindAll()
を使うことができますが、productidであるListだけが必要です。我々はSolrのコレクションからのみproductIDsを取得できますか SolrCrudRepository検索の問題
public Interface ProductRepository extends SoleCrudrepository<productEntity, Integer){
public List<Integer> getAllProductIDs();
}
? 私は常に空の結果セットを返して
@Query("Select p.id from Product p)
public List<Integer> findAllProductIDS();
てみました。