ObjectDB Database Search
1-41 of 41 resultsLiterals in JPQL and Criteria Queries Literals in JPQL, as in Java, represent constant values. JPQL supports various types of literals , including NULL , boolean literals ( TRUE and FALSE ), numeric literals (for example, 100 ), string literals (for example, 'abc' ), enum literals (for example, mypackage.MyEnum.MY_VALUE ), and entity | |
jakarta.persistence.criteria.CriteriaBuilder.literal(T) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression literal ( T value ) Create an expression for a literal . Parameters: value - value represented by the expression Returns: expression literal . Throws: IllegalArgumentException - if value is null. Since: Jakarta Persistence (JPA) 1.0 | |
Strings in JPQL and Criteria Queries String values can appear in JPQL queries in several forms: As string literals , for example, 'abc ... a path expression), and the right operand is the pattern (usually a parameter or literal ). For example ... (for any c.name value). c.name NOT LIKE '%' is always FALSE (for any c.name value). To match a literal | |
Query Parameters in JPA Queries section. Parameters vs. Literals The following is a third version of the same method ... the name directly into the query as a String literal . Using literals instead of parameters has several drawbacks. First, the query is not reusable. Different literal values result in different query | |
JPA Query Expressions (JPQL / Criteria) JPQL / Criteria Parameters JPQL / Criteria Literals Every query expression consists ... on the following pages: Literals and dates ( literal , nullLiteral , currentDate , …) Paths, navigation | |
Numbers in JPQL and Criteria Queries Numeric values can appear in JPQL queries in several forms: As numeric literals , such as 123 ... (path); // -expression Expression sqrt = cb. sqrt (cb. literal (100)); // SQRT(expression) As shown in the previous example, you can convert a number to a numeric expression by using the literal method. | |
Paths and Types in JPQL and Criteria API to iterate over all the entities in the database. The Country literal represents the Country entity ... if the type of a specified entity e is not Country . Predicate p = cb. notEqual (e. type (), cb. literal ... (which can represent any path, including a root or a join) and the entity type Country , which is a criteria literal . | |
Date and Time in JPQL and Criteria Queries Date and time expressions can appear in JPQL queries in the following ways: As date and time literals --for example, {d '2011-12-31'} and {t '23:59:59'} . As parameters --when date and time values ... ts = cb. currentTimestamp (); // both Unlike constant date literals , which are built | |
JPA Criteria API Queries query expressions: Literals and dates ( literal , nullLiteral , currentDate , ...) Paths, navigation | |
JPA Query Structure (JPQL / Criteria) and persistent fields. String literals are also case-sensitive (e.g., "ORM" and "orm" are different | |
JPA Named Queries literals dynamically into the query string, which results in more efficient queries. @NamedQuery | |
jakarta.persistence.criteria.CriteriaBuilder an expression equivalent to literal ("") . Parameters: expressions - string expressions Returns: expression ... character Returns: like predicate. Since: Jakarta Persistence (JPA) 1.0 Expression literal ( T value ) Create an expression for a literal . Parameters: value - value represented by the expression | |
jakarta.persistence.criteria.CriteriaBuilder.nullLiteral(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression nullLiteral ( Class resultClass ) Create an expression for a null literal with the given type. Parameters: resultClass - type of the null literal Returns: null expression literal . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.Entity literal in the Jakarta Persistence query language. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
java.sql.Date equals comparison not working with CriteriaAPI.get("eintritt"), builder. literal (myDate)); Doing exactly the same on the same DB in the DB Explorer ... literal with a date parameter. support Support After further investigation of this issue, it seems that criteria queries work well with literal dates, including in version 2.4.5. The following test case | |
TYPE Expression.equal(e.type(), cb. literal (Country.class)); results in the error: Caused by: com.objectdb.o ... . literal (A.class))); System.out.println("Query: " + cq);   ... static class B { } } There is still a problem with parsing class literals in query | |
jakarta.persistence.criteria.CriteriaBuilder.concat(List) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression concat ( List expressions ) Create an expression for string concatenation. If the given list of expressions is empty, returns an expression equivalent to literal ("") . Parameters: expressions | |
jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,Expression,Expression) - string expression replacement - the replacement string substring - the literal substring | |
jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,String,Expression) - string expression replacement - the replacement string substring - the literal substring to replace | |
jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,Expression,String) - string expression replacement - the replacement string substring - the literal substring to replace | |
jakarta.persistence.Entity.name Jakarta Persistence (JPA) Method in jakarta.persistence.Entity String name (Optional) The entity name. Defaults to the unqualified name of the entity class. This name is used to refer to the entity in queries. The name must not be a reserved literal in the Jakarta Persistence query language. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.CriteriaBuilder.replace(Expression,String,String) expression replacement - the replacement string substring - the literal substring to replace | |
Object as parameter results in exception the primary key is used as a literal , which means that the query has to be compiled every time and the query program cache cannot be used. Maybe ObjectDB should optimize such queries replacing literals ... . So ObjectDB would indeed cache this query the way it is? Please ignore my original post - the literals | |
Problem on JPA Merge Entity.=ERGOKeyword [id=56, preferedName==], value=TimePoint [ literal =01-01-2000]] On update ... [comparator=ERGOKeyword [id=56, preferedName==], value=TimePoint [ literal =01-01-2000]] SingleValueConstraint [comparator=ERGOKeyword [id=56, preferedName==], value=TimePoint [ literal =10-10-1900 | |
Searching lists within objects Test 6 fails because in comparison of Object ( Attribute.getValue() ) with char literal ('5') ObjectDB considers the literal as character rather than as a string. Only in comparison of a string ... of a literal . Test 7 fails because the query is executed using an index and the transient value | |
query on calendar class literal {t c.start} or erros caused by bad operand ---After Edit: I was too accurate when tried ... is for literals , so it cannot contain variables or parameters. In comparison the operand types must match. Not | |
Using date in where clause (the creationDate field) with a string literal ("07-25-2013"). Replace the string with a date literal or a parameter . support Support | |
Possible issue for JPQL IN expression Possible issue for JPQL IN expression with a set of more than one string literals values in the path expression. Error: Exception in thread "main" [ObjectDB 2.3.7_10] SELECT e FROM MyEntity e WHERE e.country IN ('US' == , | |
Problem with 'where' and date() with dates in the Explorer by using date literals . For example: SELECT o FROM TestObject o WHERE o.date {d | |
Suggest link to Maven example from Enhancer tool page The maven plugin example here is incomplete: https://www.objectdb.com/java/jpa/tool/enhancer#Maven_and_ANT_Enhancement_ Taken literally it can't work because it's missing this: org.codehaus.mojo | |
How to add minutes to a Date with JPA2); Expression period = root.get(Counter_.Period); Expression delayPeriod = cb. literal | |
IN operator syntax Hi, what is the correct syntax for IN operator when list of literals ia used instead of parameter, e.g. SELECT FROM Info i WHERE i.status IN (1,4) ? (Suppose status is int.) I always get this exception: SELECT FROM Info i WHERE i.status IN (1 == , | |
Sorting problem" is considered as a string literal value rather than as a navigation expression), and because this constant | |
Post-compilation enhancement vs Automatic Run-time enhancement We are getting massively different results on field loading between explicit post-compile enhancement and automatic run-time enhancement. Testing exactly where and when the results are different for our demo web app is a very time consuming task, and very difficult, it means testing literally 100s | |
Criteria Query results in a NoResultException instead of returning object that converts literals to implicit parameters (to improve performance and to make using entity objects | |
ObjectDB 2.3.5 type operator and literals in client server queries ( issue #605 ). Fixed eager fetch issues. Fixed a bug in using type literals in queries. Fixed a bug in passing a new entity object with no id as | |
Issue with TYPE expression in Criteria API. literal (e.getJavaType()))); System.out.println("Query | |
ObjectDB 2.5.0 instead of a PK in find (retrieval by example). Added support of using list of literals in an query IN | |
date parameter not working (probably) in explorer'. A workaround for previous versions is to use a date literal (embedded in the query) instead of a date parameter. support Support | |
InternalException it against an existing database? In this case the app is starting against a clean database ( literally a new | |
ObjectDB 2.4.0. Fixed a bug in not using LIKE's ESCAPE when an index is used. Fixed a bug in parsing time literals in |