The problem of using Specifications to dynamically build a query to query a field in Spring data JPA

novice to java, this may be a simple question for a veteran, but it really beats me as a novice to PHP. Recently, I am changing the springmvc framework used by a java project. Some of the query statements are as follows:

public Predicate toPredicate(Root<StockOrder> root,CriteriaQuery<?> query, CriteriaBuilder cb) {

                Path<Integer> orgId = root.get("organizationId");    
                Predicate p = null;
                Predicate p1 = cb.equal(orgId, clinicId);
                p = cb.and(p1);            
                query.where(p);
                return null;
            }

now you want to query a specified field, such as name. Ask for advice

Apr.23,2022

is the field you are talking about a database operation?

it is recommended to take a look at orm frameworks that are often used in java development, such as mybatis and jpa

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4dc9b-44f53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4dc9b-44f53.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?