About like

1-10 of 200Refresh
Manual
99

Strings in JPQL and Criteria Queries

to persistent string fields. as results of predefined JPQL string manipulation functions. LIKE - String Pattern Matching with Wildcards The [NOT] LIKE operator checks if a specified string matches ... literal). For example: c.name LIKE '_r%' is TRUE for 'Brazil' and FALSE for 'Denmark' c.name LIKE
JPA Doc
76

like(x, pattern)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   String pattern ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   Expression pattern ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   String pattern,   Expression escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string escapeChar - escape character expression Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   Expression pattern,   char escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   String pattern,   char escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string escapeChar - escape character Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   Expression pattern,   char escapeChar ) Create a predicate for testing whether the expression satisfies the given pattern. Parameters: x - string expression pattern - string expression escapeChar - escape character Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   String pattern,   Expression escapeChar ) Create a predicate for testing whether the expression ... character expression Returns: like predicate Since: JPA 2.0
JPA Doc
76

like(x, pattern, escapeChar)

Method javax.persistence.criteria.CriteriaBuilder Predicate like(   Expression x,   Expression pattern,   Expression escapeChar ) Create a predicate for testing ... expression escapeChar - escape character expression Returns: like predicate Since: JPA 2.0
Forum
35

LIKE wildcard with single character "_" behaves like a "*"

Hi,  I've been using pattern matching with wildcards, and encountered an issue when dealing with the underscore character. The issue is that if it is placed at the end of the string, the "_" behaves like a "*". For example, if I have a query SELECT * FROM table1 WHERE (col1.name LIKE "ke