@Entity(name="product")
public class Product {
@Id
private Key id;
private String name;
private String code;
@Field(name="is_deleted")
private Boolean isDeleted;
}
My repository
@Repository
public interface ProductRepository extends DatastoreRepository<Product, Key> {
@Query("select * from product where LOWER(code) = LOWER(@product_code) and is_deleted = @is_deleted)
Product existsByCodeIgnoreCaseAndIsDeleted(@Param("product_code")String code, @Param("is_deleted")Boolean isDeleted);
}
When I call the method: existsByCodeIgnoreCaseAndIsDeleted() from a service I received this error message:
[Request processing failed; nested exception is com.google.cloud.datastore.DatastoreException: Unknown function "LOWER".] with root cause com.google.datastore.v1.client.DatastoreException: Unknown function "LOWER".
I also tried with lowercase "lower", with no success.
Hello mate,
Here is my entity
My repository
When I call the method: existsByCodeIgnoreCaseAndIsDeleted() from a service I received this error message:
[Request processing failed; nested exception is com.google.cloud.datastore.DatastoreException: Unknown function "LOWER".] with root cause com.google.datastore.v1.client.DatastoreException: Unknown function "LOWER".
I also tried with lowercase "lower", with no success.
Please help. Thanks