Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 查询Dsl NumberPath类操作不';行不通_Java_Hibernate_Querydsl - Fatal编程技术网

Java 查询Dsl NumberPath类操作不';行不通

Java 查询Dsl NumberPath类操作不';行不通,java,hibernate,querydsl,Java,Hibernate,Querydsl,查询DSL NumberPath类操作不起作用。下面是代码 BooleanBuilder whereClause = new BooleanBuilder(); if(columnType!=null && columnType.equalsIgnoreCase("Long")){ Number searchNumb= (Number)filterMap.get("searchText"); Long

查询DSL NumberPath类操作不起作用。下面是代码

    BooleanBuilder whereClause = new BooleanBuilder();
    if(columnType!=null && columnType.equalsIgnoreCase("Long")){
                Number searchNumb= (Number)filterMap.get("searchText");
                Long searchText=searchNumb.longValue();
                NumberPath<Long> longColumn = 
                Expressions.numberPath(Long.class,query,searchType);
                whereClause.and( longColumn.like("%"+searchText+"%") );
    }
    return logRepository.findAll(whereClause, pageable);
但是,当我在PGAdmin上使用bind值运行生成的sql时,它会给出一个结果,下面是我在PGAdmin上运行的sql

select count(commonlog0_.id) as col_0_0_ from common_log commonlog0_ where 
 cast(commonlog0_.process_id as varchar) like '%164%' escape '!'
select count(commonlog0_.id) as col_0_0_ from common_log commonlog0_ where 
 cast(commonlog0_.process_id as varchar) like '%164%' escape '!'