Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

findByNameContainingIgnoreCase -not working in case of GremlinRepository #285

Description

I am trying to use findByNameContainingIgnoreCase while working on GremlinRepository... but it is throwing error like - java.lang.UnsupportedOperationException: Unsupported keyword: CONTAINING (1): [IsContaining, Containing, Contains]

Even not working for any findByNameLike(String name) etc but working if using findByName(String name)

Model Class: Product.java

@Vertex
@Data
public class Product {
    
    @Id
    @GeneratedValue
    private String id;
    
    private String name;
    
    private String key;
    
    private String lastModifiedBy;
    private String lastModifiedTimestamp;
    private String createdBy;
    private String createdTimestamp;
    
    private Map<String,String> properties;
}

Repository Class: ProductRepository.java

@Repository
public interface ProductRepository extends GremlinRepository<Product, String>{
    List<Product> findByName(String name);
    List<Product> findByNameContainingIgnoreCase(String name);  
}

POM.XML:

 <dependency>
      <groupId>com.microsoft.spring.data.gremlin</groupId>
      <artifactId>spring-data-gremlin</artifactId>
      <version>2.3.0</version>
    </dependency>

Exception:

[2021-06-29T07:13:08.864Z] 06-29-2021 12:43:08.863 [32m[pool-2-thread-6][0;39m [1;31mERROR[0;39m c.c.ei.s2m.service.ProductsService.findAllProduct - Error Fetching all products
[2021-06-29T07:13:08.865Z] java.lang.UnsupportedOperationException: Unsupported keyword: CONTAINING (1): [IsContaining, Containing, Contains]
[2021-06-29T07:13:08.866Z] at com.microsoft.spring.data.gremlin.query.query.GremlinQueryCreator.create(GremlinQueryCreator.java:53)
[2021-06-29T07:13:08.867Z] at com.microsoft.spring.data.gremlin.query.query.GremlinQueryCreator.create(GremlinQueryCreator.java:22)
[2021-06-29T07:13:08.867Z] at org.springframework.data.repository.query.parser.AbstractQueryCreator.createCriteria(AbstractQueryCreator.java:119)
[2021-06-29T07:13:08.869Z] at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:95)
[2021-06-29T07:13:08.870Z] at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:81)
[2021-06-29T07:13:08.871Z] at com.microsoft.spring.data.gremlin.query.query.PartTreeGremlinQuery.createQuery(PartTreeGremlinQuery.java:38)
[2021-06-29T07:13:08.872Z] at com.microsoft.spring.data.gremlin.query.query.AbstractGremlinQuery.execute(AbstractGremlinQuery.java:36)
[2021-06-29T07:13:08.875Z] Function "product" (Id: 94e69927-0027-4533-96ef-9b6015ece3b1) invoked by Java Worker
[2021-06-29T07:13:08.881Z] at org.springframework.data.repository.core.support.QueryEx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions